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
- docker
- SWIFT
- Spring
- android
- Python
- Java
- Windows
- MySQL
- github
- rxswift
- centos8
- Kotlin
- php
- cocoapods
- go
- tomcat
- war
- windows10
- ios
- Xcode
- ubuntu
- Linux
- enum
- Codable
- git
- golang
- nodejs
- Gradle
- CentOS
- intellij
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함