views:

203

answers:

1

How can I find out the type of a NSDictionary element?

+5  A: 

There's various sorts of introspection you can perform on any object at runtime, contained within the NSObject protocol.

http://developer.apple.com/documentation/

e.g.

You can test the class of an object at runtime by comparing it to a class object, which you can obtain by sending a class message.

BOOL test = [self isKindOfClass:[SomeClass class]];

cms