IOS
-
func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { let urlCredential = URLCredential(trust: challenge.protectionSpace.serverTrust!) completionHandler(.useCredential, urlCredential) }
[Swift] URLSession https 인증서 신뢰func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { let urlCredential = URLCredential(trust: challenge.protectionSpace.serverTrust!) completionHandler(.useCredential, urlCredential) }
2022.11.20 -
Codable - 자신을 변환하거나 외부 표현으로 변환할 수 있는 타입 - Encodable & Decodable(프로토콜)이 합쳐진 개념 - Class, Struct, enum에 모두 사용 가능 - mvvm 패턴에서 사용 Encodable : 인코딩할 수 있는 타입 Decodable : 디코딩할 수 있는 타입 ※ 인코딩 : 사람이 인지하지 못하고 컴퓨터가 이해할 수 있도록 바꿔주는 것 디코딩 : 바이트 형식을 문자(문자열)로 변환 - json data { bkpr = 383; "cur_nm" = "\Uc544\Ub78d\Uc5d0\Ubbf8\Ub9ac\Ud2b8 \Ub514\Ub974\Ud568"; "cur_unit" = AED; "deal_bas_r" = "383.95"; "kftc_bkpr" = 3..
[Swift] Codable vs JSONSerializationCodable - 자신을 변환하거나 외부 표현으로 변환할 수 있는 타입 - Encodable & Decodable(프로토콜)이 합쳐진 개념 - Class, Struct, enum에 모두 사용 가능 - mvvm 패턴에서 사용 Encodable : 인코딩할 수 있는 타입 Decodable : 디코딩할 수 있는 타입 ※ 인코딩 : 사람이 인지하지 못하고 컴퓨터가 이해할 수 있도록 바꿔주는 것 디코딩 : 바이트 형식을 문자(문자열)로 변환 - json data { bkpr = 383; "cur_nm" = "\Uc544\Ub78d\Uc5d0\Ubbf8\Ub9ac\Ud2b8 \Ub514\Ub974\Ud568"; "cur_unit" = AED; "deal_bas_r" = "383.95"; "kftc_bkpr" = 3..
2022.10.15 -
우리끼리 - 스티커사진 * 기능 * - 사진 4장을 선택하여 스티커사진 만들 수 있습니다. - 만든 사진을 라이브러리에 저장하고, 인스타 스토리에 공유가 가능합니다. apps.apple.com Resources 폰트 : 다이어리체(https://wess.tistory.com/497) 다이어리체(EF_Diary) 다이어리체(EF_Diary) ㄱ ㄴ ㄷ ㄹ ㅁ ㅂ ㅅ ㅇ ㅈ ㅊ ㅋ ㅌ ㅍ ㅎ a b c d e f g h i j k l n m o p q r s t u w x y z 1 2 3 4 5 6 7 8 9 0 ! @ # $ % ^ & * 필기체 earlyfont 1style OFT 다운로드 웹 폰트 다.. wess.tistory.com Information - 기능 : 사진 4장을 골라서 네컷 포토..
[iOS] 우리끼리 - 스티커사진우리끼리 - 스티커사진 * 기능 * - 사진 4장을 선택하여 스티커사진 만들 수 있습니다. - 만든 사진을 라이브러리에 저장하고, 인스타 스토리에 공유가 가능합니다. apps.apple.com Resources 폰트 : 다이어리체(https://wess.tistory.com/497) 다이어리체(EF_Diary) 다이어리체(EF_Diary) ㄱ ㄴ ㄷ ㄹ ㅁ ㅂ ㅅ ㅇ ㅈ ㅊ ㅋ ㅌ ㅍ ㅎ a b c d e f g h i j k l n m o p q r s t u w x y z 1 2 3 4 5 6 7 8 9 0 ! @ # $ % ^ & * 필기체 earlyfont 1style OFT 다운로드 웹 폰트 다.. wess.tistory.com Information - 기능 : 사진 4장을 골라서 네컷 포토..
2022.10.08 -
Label이 저렇게 잘리면 크기를 조절해도 되지만 그렇지 못한 상황이 발생함 → 코드로 사용 if logoLabel.adjustsFontSizeToFitWidth == false{ logoLabel.adjustsFontSizeToFitWidth = true }
[iOS] Label 잘림Label이 저렇게 잘리면 크기를 조절해도 되지만 그렇지 못한 상황이 발생함 → 코드로 사용 if logoLabel.adjustsFontSizeToFitWidth == false{ logoLabel.adjustsFontSizeToFitWidth = true }
2022.08.24 -
1. 만약 Object들을 배열로 묶어줘야 한다면 배열로 묶어줄 Object에 선언 @IBOutlet var imgViews: [UIImageView]! 2. for문을 사용하여 각 Object에 적용되게 하기 for i in 0..
[iOS] IBOutlet Collection1. 만약 Object들을 배열로 묶어줘야 한다면 배열로 묶어줄 Object에 선언 @IBOutlet var imgViews: [UIImageView]! 2. for문을 사용하여 각 Object에 적용되게 하기 for i in 0..
2022.08.24 -
func AssetsToImage(assets: PHAsset) -> UIImage? { let manger = PHImageManager.default() let option = PHImageRequestOptions() var image = UIImage() option.isSynchronous = true manger.requestImage(for: assets, targetSize: CGSize(width: assets.pixelWidth, height: assets.pixelHeight), contentMode: .aspectFill, options: option, resultHandler: {(result, info)-> Void in image = result! }) return image ..
[iOS] PHAsset을 UIImage로 변환하기func AssetsToImage(assets: PHAsset) -> UIImage? { let manger = PHImageManager.default() let option = PHImageRequestOptions() var image = UIImage() option.isSynchronous = true manger.requestImage(for: assets, targetSize: CGSize(width: assets.pixelWidth, height: assets.pixelHeight), contentMode: .aspectFill, options: option, resultHandler: {(result, info)-> Void in image = result! }) return image ..
2022.08.24