Created
October 22, 2014 03:29
-
-
Save justinHowlett/35f8c5929c90fbf038e5 to your computer and use it in GitHub Desktop.
Basic mirroring in Swift
This file contains 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
let mirror = reflect(objectInstance) | |
for index in 0 ..< mirror.count { | |
let (childKey, childMirror) = mirror[index] | |
println("key is \(childKey)") | |
println("value is \(childMirror.value)") | |
println("valuetype is \(childMirror.valueType)") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment