I have an Object: aObject, it has properties a,b,c.
I can access the properties using:
aObject.a
aObject.b
aObject.c
Is it possible to access all properties of the object using id? such as
[aObject indexOf:0]
[aObject indexOf:1]
[aObject indexOf:2]
or something likes that.
Welcome any comment
KVC (Key Value Coding) will allow you to set values of properties using the method
[anObject setValue:aValue forKey:@"a"].If you truly want to iterate through each property, setting its value, then you will need to drop down to the objective-c runtime.