Why does the following code returns not a NSDictionary
, but a __NSDictionaryI
?
NSDictionary* dict = [NSDictionary dictionary];
Class c = [dict class];
NSLog(@"%@", c);
What are my options to check if an object is an instance of NSDictionary
? As I've found out, I can't call [__NSDictionaryI class]
because it's not visible.
[dict classForCoder]
returns NSDictionary
and seems to be a good solution, but won't it fail when calling on object of some custom class? What is the most universal method to check if an object is an instance of a given class?