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 |
Tags
- clean architecture
- Refactoring
- Observable
- UITextView
- uitableview
- MVVM
- UICollectionView
- HIG
- 리팩토링
- Protocol
- 스위프트
- SWIFT
- swift documentation
- tableView
- RxCocoa
- 애니메이션
- ribs
- collectionview
- ios
- 클린 코드
- Clean Code
- map
- rxswift
- Human interface guide
- Xcode
- 리펙터링
- swiftUI
- 리펙토링
- combine
- uiscrollview
Archives
- Today
- Total
목록RawValue (1)
김종권의 iOS 앱 개발 알아가기
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cPPOFN/btrs59I1gDh/dd9c9LxLcMy1Sn1bgFowOk/img.png)
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