Created
June 24, 2015 00:42
-
-
Save tempire/ea9f51027ca34f5d2cd8 to your computer and use it in GitHub Desktop.
Simple swift reflection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| var str = "Hello, playground" | |
| class Hello { | |
| var id: String | |
| init(id: String) { | |
| self.id = id | |
| } | |
| } | |
| let h = Hello(id: "glen") | |
| println(reflect(h).valueType) | |
| println(reflect(h)[0][0]) | |
| println("ok") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment