I know the string name of a property of an object. How would I go about getting and setting that property using the string?
@synthesize propertyName automates the generation of getter and setter methods.
The compiler generates
- (id)propertyName;- (void)setPropertyName;If you have a selector as NSString, you can use performSelector:NSSelectorFromString.
e.g.:
[object performSelector:NSSelectorFromString(@"propertyName") ...]