일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- HIG
- clean architecture
- map
- ios
- ribs
- SWIFT
- RxCocoa
- uitableview
- 리펙터링
- UICollectionView
- tableView
- swift documentation
- 리펙토링
- Human interface guide
- swiftUI
- Clean Code
- Refactoring
- uiscrollview
- Xcode
- rxswift
- collectionview
- 스위프트
- Protocol
- 클린 코드
- 애니메이션
- UITextView
- combine
- MVVM
- Observable
- 리팩토링
- 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인스턴스를 가지고 있으니, 최종적..