
Swift언어에서는 KVC, Key-Value-Coding을 지원하는데요. KVC란 객체의 값을 직접적으로 가져오는 것이 아닌, Key 또는 KeyPath 를 이용해서 간접적으로 접근해서 읽고 쓸 수 있는 기능입니다.오늘은 Swift언어로 구현한 struct, class structure의 멤버변수, 상수 값들을 WritableKeyPath, KeyPath으로 접근하고, 읽기 쓰기하는 연습을 해보겠습니다. Swift KVC(Key-Value Coding) KeyPath 사용 전, class, struct 구성하기 먼저, struct, class 몇개를 구성했습니다. Baby 구조체는 age, height 변수와 cat: Cat, dog: Dog를 갖습니다. class 타입의 Cat, struct 타입의 ..
iOS 개발/iOS 개발 팁
2022. 10. 23. 07:06
반응형
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- swift reduce
- swift문제
- 프로토콜
- 김프매매
- 프로그래머스swift
- Collection
- ios
- 알고리즘문제
- publisher
- 스위프트
- swift
- 알고리즘
- CoreML
- 백준swift
- swift 기초
- Swift 알고리즘
- createML
- swift 문자열
- SwiftUI
- swift string
- 개발자문서
- 백준알고리즘
- swift알고리즘
- 프로그래머스
- uikit
- 부스트코스
- 컬렉션
- 자연어처리
- Protocol
- swift언어
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함