Can we get an ivar
or a property
from a NSString
like we can get a class
from a NSString
with the function NSClassFromNSString()
?
For any properties you can just use [object valueForKey:myString]
and it'll be done. This can also find ivars in certain situations.
There are a number of functions in the Objective-C Runtime that let you get the list of ivars, properties, and methods associated with a given class, and then to get information about individual ivars, properties, and methods. Take a look at the Objective-C Runtime Reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With