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
- HIG
- combine
- rxswift
- uiscrollview
- swift documentation
- 클린 코드
- Clean Code
- 리팩토링
- UICollectionView
- Refactoring
- MVVM
- 리펙토링
- UITextView
- Protocol
- RxCocoa
- ios
- uitableview
- Human interface guide
- ribs
- SWIFT
- 스위프트
- collectionview
- tableView
- map
- Xcode
- swiftUI
- 애니메이션
- 리펙터링
- clean architecture
- Observable
Archives
- Today
- Total
목록RawValue (1)
김종권의 iOS 앱 개발 알아가기
[iOS - swift] RawRepresentable 프로토콜 (enum의 rawValue 커스텀 방법)
enum에서 RawValue를 커스텀할 수 있는 방법? 만약 rawValue를 가져올 때 side effect 처리를 추가하고 싶은 경우? 아래처럼 rawValue를 '='이나 implicit raw value로 지정되는게 아닌 직접 커스텀하고 싶은 경우? enum Person: String { case jake = "jake" case kim // implicit raw value of "kim" } let person = Person.jake print(person.rawValue) // "jake" RawRepresentable을 사용하여 커스텀 가능 RawRepresentable 이란? swift에서의 enum은 하나 이상의 `associated value`를 갖을 수 있는데, 이 값의 rawVa..
iOS 응용 (swift)
2022. 2. 14. 02:00