Hi, I was wondering if there is something similar to NSObject's value(forKey:)
for structs. I need to get a structs attribute by name and I don't want to turn my structs into classes, inherit from NSObject
and use @objc
in my attributes as I think it doesn't look good.
I also read that you can use Mirror
and use the children
property to iterate the attributes but given that performance is important in my case it doesn't look like a good option.
Any help would be appreciated, thanks!