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
- swift documentation
- Refactoring
- 스위프트
- UITextView
- clean architecture
- Observable
- uiscrollview
- Clean Code
- 리펙터링
- rxswift
- 리팩토링
- 클린 코드
- 애니메이션
- combine
- tableView
- MVVM
- collectionview
- ios
- Human interface guide
- UICollectionView
- Protocol
- SWIFT
- Xcode
- swiftUI
- HIG
- 리펙토링
- ribs
- RxCocoa
- uitableview
- map
Archives
- Today
- Total
목록Cancellable (1)
김종권의 iOS 앱 개발 알아가기
[iOS - SwiftUI] Combine의 Cancellable (AnyCancellable) 사용 방법
목차) Combine - 목차 링크 Cancellable Combine 작업들을 취소할 수 있다는 의미를 가지고 있는 프로토콜 Combine에서는 이벤트 스트림을 action이라는 이름을 사용, action을 취소할 수 있는 프로토콜이 Cancellable이라는 의미 AnyCancellable final public class AnyCancellable : Cancellable, Hashable .sink로 이벤트를 구독하면 리턴값으로 AnyCancellable이 얻어지는데 이 값을 가지고 cancel()하여 언제든지 구독을 취소시킬 수 있는 기능 final class MyModel { @Published var number: Int init(number: Int) { self.number = numbe..
iOS Combine (SwiftUI)
2022. 9. 16. 22:42