일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- ios
- SWIFT
- 스위프트
- rxswift
- Human interface guide
- UICollectionView
- MVVM
- tableView
- Protocol
- 리펙토링
- map
- Observable
- Refactoring
- 애니메이션
- ribs
- clean architecture
- uiscrollview
- Clean Code
- swift documentation
- Xcode
- 리팩토링
- collectionview
- swiftUI
- HIG
- UITextView
- combine
- uitableview
- RxCocoa
- 클린 코드
- 리펙터링
- Today
- Total
목록dynamicMemberLookup (2)
김종권의 iOS 앱 개발 알아가기
KVC와 KeyPath KVC(Key - Value coding) - 객체의 값을 직접 가져오지 않고 KeyPath를 이용해서 간접적으로 데이터를 가져오거나 사용 (key는 string) KeyPath 값에 대한 참조가 아닌, 프로퍼티를 참조 struct Person { var name: String } let person = Person(name: "jake") person.name // 값을 참조 person[keyPath: \.name] // 프로퍼티를 참조 KeyPath 종류 AntyKeyPath: 타입이 지워진 KeyPath PartialKeyPath: 부분적으로 타입이 지워진 KeyPath KeyPath: 읽기 전용 WriatableKeyPath: 읽기, 쓰기 가능 ReferenceWritab..
KeyPath 특정 속성에 대한 path정보를 가지고 있는 key값 (KeyPath 인스턴스를 통해 해당 값에 접근이 가능) // KeyPath 문법: `\`키워드 + 유형 + 프로퍼티 이름 let nameKeyPath: KeyPath = \Person.name let person = Person(age: 12, name: "jake") print(person[keyPath: nameKeyPath]) // jake KeyPath 활용 - RxSwift의 Observable 구독 할때 특정 property를 가져오기 위해 map에서 사용 (간결성 향상) struct Person { var age: Int var name: String } var personObservable: Observable { Obs..