If you have an arbitrary object in Objective-C (typed id), you can request information about its class by calling the selector class:
Class c = [obj class];
You can write this to the console ( NSLog(@"%@", [obj class])) or perform other operations to see which selectors are supported on the object, etc.
Jason source
share