Skip to content

Instantly share code, notes, and snippets.

@tempire
Created June 24, 2015 00:42
Show Gist options
  • Select an option

  • Save tempire/ea9f51027ca34f5d2cd8 to your computer and use it in GitHub Desktop.

Select an option

Save tempire/ea9f51027ca34f5d2cd8 to your computer and use it in GitHub Desktop.
Simple swift reflection
//: 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