Lee Morgan: We’ll go ahead and extend our KVC protocol and add our default implementation. extension KVC { func valueForKey(key : String) -> Any? { let mirror = reflect(self) for index in 0 ..< mirror.count { let (childKey, childMirror) = mirror[index] if childKey == key { return childMirror.value } } return nil } } David … Continue reading Dynamic Swift
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed