I want to check the type of an Object. How can I do that?
The scenario is I\'m getting an object. If that object is of type A then do some operations. If it is of ty
A more common pattern in Objective-C is to check if the object responds to the methods you are interested in. Example:
if ([object respondsToSelector:@selector(length)]) { // Do something } if ([object conformsToProtocol:@protocol(NSObject)]) { // Do something }