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 |
Tags
- UITextView
- 리펙터링
- ios
- 스위프트
- uitableview
- SWIFT
- swiftUI
- map
- swift documentation
- 리펙토링
- HIG
- Observable
- 애니메이션
- Clean Code
- Protocol
- Xcode
- rxswift
- 클린 코드
- tableView
- collectionview
- UICollectionView
- Human interface guide
- ribs
- uiscrollview
- clean architecture
- 리팩토링
- RxCocoa
- MVVM
- combine
- Refactoring
Archives
- Today
- Total
목록tryFirst (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