Given an object foo of class Foo, I want to do the following:
NSString *key = @"some key";
id myObj = [foo valueForKey: key];
and have myObj equal to foo.
Is there a way to do this without defining a category on Foo?
Given an object foo of class Foo, I want to do the following:
NSString *key = @"some key";
id myObj = [foo valueForKey: key];
and have myObj equal to foo.
Is there a way to do this without defining a category on Foo?
The following works for me, returning foo:
id myObj = [foo valueForKey: @"self"];