swift2 - reflect property value on swift 2.0 -


how can fetch property value on swift 2.0? on swift 1.0, can mirror value value property, cannot find api this. new mirror type on swift 2.0 has few api. there other way achieve this?

this usage of reflection swift 2.

let mirror = mirror(reflecting: obj) child in mirror.children {     guard let key = child.label else {         continue     }     let value = child.value      // use value or key here } 

Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -