전체 글(315)
-
iOS) stackView의 frame.width가 0.0으로 나올때 (feat. layoutIfNeeded())
https://stackoverflow.com/questions/62121352/why-view-frame-width-returns-zero Why view.frame.width returns zero? I created stackView and added three labels to it. Also I put these constraints let nameLabel = UILabel() //set .text, .mode and other for nameLabel let ellipsisLabel = UILabel() //set .text, .mode... stackoverflow.com 개발자 사는거 다 똑같..! 왜 내 width가 zero를 리턴하나요..! stackView안에 uiImage가 set..
2022.02.15 -
iOS) 특정 iPhone, iPad에서 tableView cell안에 있는 버튼이 클릭이 안될때..(feat. addtarget, lazy var, dellocation)
https://stackoverflow.com/questions/28894765/uibutton-action-in-table-view-cell UIButton action in table view cell I am trying to run an action for a button being pressed within a table view cell. The following code is in my table view controller class. The button has been described as "yes" in an outlet in my stackoverflow.com 테이블뷰 내부에 있는 테이블뷰 셀에, vertical stackView를 넣고 vertical stackView 내부에 l..
2022.02.14 -
iOS) 특정 label만 color와 폰트를 다르게 하고 싶을때
https://0urtrees.tistory.com/183 iOS UILabel 텍스트 특정범위 폰트크기, 색상 속성 부여하기 안녕하세요. 멍구입니다. 🤗 종종 iOS개발 간 UILabel 하나의 텍스트 특정범위에 폰트크기, 색상, 배경색상 등의 속성을 부여하고 싶을때가 생기는데요. 이럴때 부분적인 속성 설정을 위해서 라벨 0urtrees.tistory.com
2022.02.10 -
Error Domain=AVFoundationErrorDomain Code=-11852 "Cannot use Back Camera"
기기의 앨범에 있는 사진을 선택하거나, 사진을 직접 찍고 이 사진을 업로드해보는 프로젝트 작업을 하던 중 마주한 에러. Change your dealloc Method를 설정하거나 [self.captureSession removeInput:self.videoInput]; [self.captureSession removeOutput:self.videoOutput]; self.captureSession = nil; self.videoOutput = nil; self.videoInput = nil; 간단하게 앱 설정을 변경해주면 된다 Please check your device settings. Goto privacy ---> Camera ---> check setting for your app-----> t..
2022.01.27 -
iOS) 서버통신...... 그게뭔데.. 어떻게 하는건데..(feat. http에 대한 이해, URLSession, URLRequest, datatask, codable, jsonserialization, JSONDecoder)
걸음마 앱을 만들다보면 로컬 작업만으로도 충분한 경우가 있지만, 웹 서버와의 통신이 필요한 경우가 대부분입니다. 웹서버 통신은 크게 http통신과 웹소켓통신으로 나뉘는데 저는 http통신을 이용했습니다. http 통신 http는 Hyper Text Transfer Protocol의 두문자어로, 인터넷에서 데이터를 주고받을 수 있는 프로토콜이며, URL기반으로 클라이언트(사용자)에서 서버로 요청(request)을 보내고, 서버로부터 응답(response)을 받는 형태의 통신입니다. 프로토콜….? 프로토콜은 쉽게 말해서 클라이언트와 서버가 통신할때, 클라이언트: 나는 요런요런 형식으로 데이터를 요청(request)할게 🙋♀️ 서버: ㅇㅋㅇㅋ. 난 너가 요청한 형식 그대로 데이터를 받을게 🤦♀️ 이런식으로..
2022.01.27 -
iOS) multipart/form-data 이해하기
http(request와 response)는 아래의 네개로 나뉘는데, 1) Request Line 2) HTTP Header 3) Empty Line 4) Message Body message body에 들어가는 데이터 타입을 HTTP Header에 명시해줄 수 있습니다. 이 필드가 바로 Content-type 이 Content-type필드에 밈타입(multipurpose internet mail extensions)을 적어줄 수 있는데, 그 여러 타입들 중 하나가 multipart입니다. * 브라우저들은 리소스를 내려받았을때 해야 할 기본 동작이 무엇인지를 결정하기 위해 대게 MIME 타입을 사용합니다. 밈타입? MIME은 다목적 인터넷 메일 확장이란 뜻으로 전자우편의 데이터 형식을 정의한 표준 포맷입..
2022.01.25