Swift. @dynamicMemberLookup
swift의 dynamicMemberLookup에 대해서 알아볼까 합니다. 4.2에서 만들어진 녀석인데요. Dictionary 형태의 값을 가지고 subscript(dynamicMember:)를 가지고 값을 마치 property 처럼 사용이 가능하도록 한 겁니다. 다음과 같은 형태로 만들수 있어요. @dynamicMemberLookup struct PropertyDictionary { private let properties: [String: Any] init(_ dictionary: [String: Any]) { properties = dictionary } subscript(dynamicMember string: String) -> Any? { return properties[string] } } 자..
Mobile/iOS
2021. 1. 3. 15:39
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- android
- tomcat
- github
- go
- Codable
- Kotlin
- Gradle
- php
- Java
- war
- docker
- Spring
- cocoapods
- enum
- MySQL
- Python
- windows10
- intellij
- rxswift
- CentOS
- golang
- ubuntu
- ios
- Xcode
- git
- Linux
- centos8
- nodejs
- SWIFT
- Windows
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함