일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- uitableview
- Clean Code
- combine
- 리펙토링
- Observable
- swift documentation
- collectionview
- rxswift
- UITextView
- 리펙터링
- Refactoring
- UICollectionView
- SWIFT
- uiscrollview
- map
- 애니메이션
- 클린 코드
- ribs
- 리팩토링
- swiftUI
- Protocol
- Xcode
- HIG
- ios
- RxCocoa
- MVVM
- clean architecture
- 스위프트
- tableView
- Human interface guide
- Today
- Total
목록Sequence (2)
김종권의 iOS 앱 개발 알아가기
목차) Combine - 목차 링크 Just 에러 타입은 항상 Never인 가장 단순한 형태의 Publisher Just(1) .sink { print("Just: \($0)") } // Just: 1 Just((1,2,3)) .sink { print("Just: \($0)") } // Just: (1, 2, 3) Just([1,2,3]) .sink { print("Just: \($0)") } // Just: [1, 2, 3] Sequence 주어진 Sequence를 방출하는 Publisher Publishers.Sequence(sequence: [1,2,3]) .sink( receiveCompletion: { print("receiveCompletion: \($0)") }, receiveValue: {..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/kOJ8w/btrAc6scOAw/KhoQL852K3hHbkispjKbNk/img.png)
allSatisfy 연산자 Collection의 모든 요소가 특정 조건을 만족시키는지 알고 싶은 경우 사용 ex) 배열을 순회하면서 원소들이 특정 조건을 모두 만족하는지 확인할 때 사용 Array, Dictionary, Set 타입에 사용 let arr = ["abcdef", "12345", "문자열"] let bool = arr.allSatisfy { $0.count > 2 } print(bool) // true let dict = ["1": 1, "2": 2] let bool2 = dict.allSatisfy { $0.key == String($0.value) } print(bool2) // true var set = Set() set.insert(2) set.insert(4) set.insert(6..