Trying to get all properties of UIView or UIViewController with the follownig:
func propertysNames()->[String]{
var s = [String]()
for c in Mirror(reflecting: self).children
{
if let name = c.label{
s.append(name)
}
}
return s
}
This works on UIVIewController, but UIView does not seem to return properties, any advice?
Aucun commentaire:
Enregistrer un commentaire