Hi, How do i create dynamic properties on an object in objective-c? in ActionScript we can do something like this
var obj : Object;
obj[ "myDynamicProperty" ] = true;
trace( obj.myDynamicProperty );
How would i do this in objective-c?
I have tried the following
NSObject *obj = [[NSObject alloc] init];
[obj setValue:@"labelValue" forKey:@"label"];
But that just throws a runtime error. Any help would be much appreciated. Thanks in advance.