일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- rxswift
- tableView
- 애니메이션
- SWIFT
- 리펙토링
- UICollectionView
- combine
- swift documentation
- collectionview
- Observable
- uitableview
- 클린 코드
- 리펙터링
- UITextView
- uiscrollview
- Refactoring
- Clean Code
- map
- HIG
- MVVM
- swiftUI
- 리팩토링
- ios
- Xcode
- Human interface guide
- ribs
- 스위프트
- Protocol
- RxCocoa
- clean architecture
- Today
- Total
목록decoding (3)
김종권의 iOS 앱 개발 알아가기
Swift에서의 map의 역할 map, flatMap 둘 다 클로저가 Optional일 때와 non-Optional일때의 기능이 다르므로 주의 Optional일때의 기능 - 형변환 (flatMap은 형변환을 완료하고 unwrapping까지 수행) non-Optional일때의 기능 - 원소들에 하나하나씩 접근하여 변형을 주는 것 non-Optional일때의 map 예시) let someString = "123456" let newString = someString .map { String($0) + "a" } print(newString) // ["1a", "2a", "3a", "4a", "5a", "6a"] non-Optional일때의 flatMap 예시) flatMap의 역할 - Sequence의 배열..
* 기본적인 Codable, Decode, Encode 개념은 이곳 참고 * 관련 포스팅 글 json, codable, nestedContainer(keyedBy:forKey:), Decoding 중첩 모델 처리 방법 (디코딩) json, codable, nestedContainer(keyedBy:forKey:), Encoding 중첩 모델 처리 방법 (인코딩) json, codable, nestedContainer(keyedBy:forKey:), KeyedCodable로 중첩 모델 처리 방법 중첩 모델을 flatten 모델로 정의 방법 이전 포스팅 글인 디코딩과 마찬가지로 nestedContainer(keyedBy:forKey:) 사용 (관련 개념은 이전 포스팅 글 참고) ex) 아래 json 데이터에..
* 기본적인 Codable, Decode, Encode 개념은 이곳 참고 * 관련 포스팅 글 json, nestedContainer(keyedBy:forKey:), Decoding 중첩 모델 처리 방법 (디코딩) json, nestedContainer(keyedBy:forKey:), Encoding 중첩 모델 처리 방법 (인코딩) json, nestedContainer(keyedBy:forKey:), KeyedCodable로 중첩 모델 처리 방법 중첩 모델을 flatten 모델로 정의 방법 nestedContainer(keyedBy:forKey:) 사용 nestedContainer에 접근할때 사용되는 메소드 ex) 아래 json 데이터에서 blog_info.name.first 값만 사용하고 싶은 경우, ..