일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
31 |
- 리펙토링
- SWIFT
- UITextView
- 클린 코드
- ribs
- UICollectionView
- Refactoring
- map
- Xcode
- uitableview
- swiftUI
- HIG
- ios
- clean architecture
- collectionview
- MVVM
- tableView
- 스위프트
- swift documentation
- RxCocoa
- 애니메이션
- Human interface guide
- 리펙터링
- Observable
- uiscrollview
- 리팩토링
- Protocol
- combine
- rxswift
- Clean Code
- Today
- Total
목록Reactive Extension (2)
김종권의 iOS 앱 개발 알아가기
Reactive Extension Reactive란? base를 초기화로 넘겨주면, 내부에서 base property를 들고있는 상태 @dynamicMemberLookup public struct Reactive { public let base: Base public init(_ base: Base) { self.base = base } public subscript(dynamicMember keyPath: ReferenceWritableKeyPath) -> Binder where Base: AnyObject { Binder(self.base) { base, value in base[keyPath: keyPath] = value } } } Reactive Extension extension으로 Base ..
Reactive Extension을 사용하기 위해 알아야하는 개념 KeyPath, WritableKeyPath, ReferenceWritableKeyPath, DynamicMemberLookup 개념 포스팅 글 Observable, Observer, Producer, ControlEvent, Binder 개념 (RxSwift, RxCocoa) 포스팅 글 Reactive란? rx 네임 스페이스의 정체 아래와 같이 RxSwift의 Reactive 파일을 보면, ReactiveCompatible에 rx 연산 프로퍼티가 존재하고 getter부분에는 타입을 리턴 ReactiveCompatible을 채택하면 해당 클래스에서는 rx프로퍼티로 접근할 수 있고, rx프로퍼티에서는 base인스턴스를 가지고 있으니, 최종적..