Tutorial by Examples

Creating the class to be the subject of the Mirror class Project { var title: String = "" var id: Int = 0 var platform: String = "" var version: Int = 0 var info: String? } Creating an instance that will actually be the subject of the mirror. Also he...
Using the Swift class Mirror works if you want to extract name, value and type (Swift 3: type(of: value), Swift 2: value.dynamicType) of properties for an instance of a certain class. If you class inherits from NSObject, you can use the method class_copyPropertyList together with property_getAttrib...

Page 1 of 1