iOS

    [Combine 책 정리] Chapter 10: Debugging

    안녕하세요 코찐입니다. 아래의 자료를 따라서 공부하고 있습니다. https://www.raywenderlich.com/books/combine-asynchronous-programming-with-swift/v2.0 let subscription = (1...3).publisher .print("publisher") .sink { _ in } // 다음에서 발췌: By Marin Todorov. ‘Combine: Asynchronous Programming with Swift.’ Apple Books. publisher: receive subscription: (1...3) publisher: request unlimited publisher: receive value: (1) publisher: rec..

    [Combine 책 정리] Chapter 9: Networking

    안녕하세요 코찐입니다. 아래의 자료를 따라서 공부하고 있습니다. https://www.raywenderlich.com/books/combine-asynchronous-programming-with-swift/v2.0 한 가지 API Publisher에 여러 Subscriber가 붙는 예제입니다. let url = URL(string: "https://www.raywenderlich.com")! let publisher = URLSession.shared .dataTaskPublisher(for: url) .map(\.data) .multicast { PassthroughSubject() } let subscription1 = publisher .sink(receiveCompletion: { complet..

    [iOS] 이슈 해결: CloudKit integration does not support unique constraints

    안녕하세요 코찐입니다. 어제 개인앱으로 만들고 있는 '행복한 사전'에 메일이 들어왔습니다. 오랜만에 앱을 수정하고자 Xcode에서 앱을 켰는데 에러가 뜨네요ㅎ;; 이번 글에서는 CloudKit integration does not support unique constraints. 이 에러에 대해서 한번 알아보겠습니다. Thread 2: Fatal error: Unresolved error Error Domain=NSCocoaErrorDomain Code=134060 "코어 데이터에서 오류가 발생했습니다." UserInfo={NSLocalizedFailureReason=CloudKit integration does not support unique constraints. The following entit..

    [Combine 책 정리] Chapter 7: Sequence Operators

    안녕하세요 코찐입니다. 아래의 자료를 따라서 공부하고 있습니다. https://www.raywenderlich.com/books/combine-asynchronous-programming-with-swift/v2.0 Finding values min greedy: publisher가 finsih될 때 까지 기다림 [1, -50, 246, 0].publisher.min() // -50 value가 Comparable을 준수하지 않는다면? Comparable을 준수하지 않는 객체가 있으면 비교문을 직접 넣어서 min을 사용할 수 있다. 아래 예제에서는 억지로 Comparable을 준수하지 않도록 만든 다음 min을 찾도록 해보는 것. 조금 억지지만 이렇게 하면 결과값에서 다시 String으로 변환해서 체크해..

    [iOS] UITextField placeholder color 변경하기

    안녕하세요 코찐입니다. UITextField를 쓸 때 플레이스 홀더 텍스트의 색상을 변경할 일이 있습니다. textField.placeholderColor 로 지정가능하면 좋을텐데 그런 변수는 없습니다... 그래서 매번 검색해서 찾게되는데요. 다음에 또 찾을 수 있도록 기록차 남겨둡니다. 해결책 https://stackoverflow.com/questions/1340224/iphone-uitextfield-change-placeholder-text-color iPhone UITextField - Change placeholder text color I'd like to change the color of the placeholder text I set in my UITextField controls, t..

    [iOS] overrideUserInterfaceStyle 부분 적용하기

    안녕하세요 코찐입니다. iOS 13 부터 다크모드가 도입되었습니다. 앱 전체를 시스템 설정에 따라 다크모드 적용한다면 별 이슈가 없을 수도 있을 것 같습니다. 하지만 제가 개발 중인 환경에서는 일부만 다크모드를 적용해서 업데이트하기로 했습니다. 그리고 시스템 설정이 아니라 앱 내부 설정에서 다크모드 변경을 제공하는 경우도 있을 겁니다. 그럴 때 유용하게 사용할 수 있는 프로퍼티가 있습니다. https://developer.apple.com/documentation/uikit/uiview/3238086-overrideuserinterfacestyle overrideUserInterfaceStyle 인데요. 상위 ViewController나 Windowr가 다크모드로 되어 있더라도, 하위 View만 라이트모..

    [Combine 책 정리] Chapter 6: Time Manipulation Operators

    안녕하세요 코찐입니다. 이번 챕터는 Time manipulation(시간 조작)에 관한 챕터입니다. 아래의 자료를 따라서 공부하고 있습니다. 하나하나 따라하기 좋게 구성되어 있습니다. https://www.raywenderlich.com/books/combine-asynchronous-programming-with-swift/v2.0 https://github.com/raywenderlich/comb-materials/tree/editions/2.0/06-time-based-operators/projects raywenderlich/comb-materials The projects and the materials that accompany the Combine: Asynchronous Programmin..

    [Combine 책 정리] Chapter 5: Combining Operators

    내용을 전부 쓰는 것 보다 좀 더 요약하는게 좋을 것 같아서 요약하는 방식으로 변경했습니다. https://www.raywenderlich.com/books/combine-asynchronous-programming-with-swift/v2.0 책 보면서 학습하고 있습니다. 더보기 이전글 2021/01/03 - [Reactive Programming] - [Combine 책 정리] Chapter1. Hello, Combine! 2021/01/06 - [Reactive Programming] - [Combine 책 정리] Chapter2. Hello, Combine! 2021/01/12 - [Reactive Programming] - [Combine 책 정리] Chatper 3: Transforming O..