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 | 31 |
Tags
- UITextView
- swiftUI
- collectionview
- HIG
- uiscrollview
- claude code
- rxswift
- UICollectionView
- 클린 코드
- 스위프트
- SWIFT
- Observable
- ios
- Human interface guide
- 클로드코드
- tableView
- Protocol
- combine
- clean architecture
- Xcode
- 애니메이션
- MVVM
- swift documentation
- Clean Code
- Refactoring
- 리펙토링
- RxCocoa
- uitableview
- 리팩토링
- map
Archives
- Today
- Total
목록compactMapValues (1)
김종권의 iOS 앱 개발 알아가기
[iOS - swift] 자주 쓰지 않지만 유용한 연산자 (isMultiple(of:), compactMapValues, 딕셔너리 value 변환)
isMultiple(of:) 연산자 나누어 떨어지는지 판단하는 연산자 // bad print(6 % 3 == 0) // true // good print(6.isMultiple(of: 3)) // true compactMapValues 연산자 딕셔너리의 value값을 mapping하는 연산자 let dictionary = ["a": "1", "b": "2", "c": "three"] // bad var convertedDictionary1 = [String: Int]() dictionary .forEach { if let val = dictionary[$0.key], let int = Int(val) { convertedDictionary1[$0.key] = int } } print(convertedDi..
iOS 응용 (swift)
2024. 4. 3. 01:43