Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Observable
- uiscrollview
- map
- combine
- Xcode
- swiftUI
- MVVM
- Protocol
- 애니메이션
- collectionview
- clean architecture
- Clean Code
- Refactoring
- 클린 코드
- uitableview
- RxCocoa
- Human interface guide
- UICollectionView
- swift documentation
- ios
- UITextView
- ribs
- 스위프트
- tableView
- HIG
- SWIFT
- 리펙토링
- 리펙터링
- 리팩토링
- rxswift
Archives
- Today
- Total
목록2022/11/13 (1)
김종권의 iOS 앱 개발 알아가기
[iOS - SwiftUI] Combine Selecting 연산자 (first, last, tryFirst, tryLast, output)
목차) Combine - 목차 링크 Selecting 연산자 * Combine에서 제공하는 Selecting 연산자는 기존 Swift에서 제공하는 연산자의 인터페이스와 동일하게 설계되어 사용하기 쉽도록 구현 first() [1,2,3,4,5].publisher .first() .sink { print($0) } // 1 last() [1,2,3,4,5].publisher .last() .sink { print($0) } // 5 tryFirst 조건에 해당하는 firrst를 만나기 전까지 throw가 발생 안하면 에러 x struct SomeError: Error {} [1,2,3,4,5].publisher .tryFirst(where: { guard $0 != 3 else { throw SomeErro..
iOS Combine (SwiftUI)
2022. 11. 13. 23:02