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