I'm very new to this language, but have a good grasp of others.
I'm wondering how to dynamically access a field name property in objective c.
Something like:
self.bottomText.text = @"foo";
Going to:
NSString *bottomText = @"bottomText";
self[bottomText].text = @"foo";
I can understand how it would be possible to set the property like this (as per the duplication mark below):
[self setValue:value forKey:@"propertyName"];
But it seems to me that either it would have to be along the lines of:
[self.bottomText setValue:@"foo" forKey:@"text"];
Which doesn't really solve the problem, or something like:
[self setValue:bottomText forKey:property].text = @"foo";
Not knowing what property is.
Or maybe:
[self valueForKey:bottomText].text = @"Test";
But no love.
Super-confused on this one.