Reputation: 1266
So I have a Class object, say for class 'D'. Is there a way to figure out if that class object is a subclass of another Class object, say 'B'? I tried -isKindOfClass:
and isMemberOfClass
, but neither worked. Thanks!
Upvotes: 3
Views: 358
Reputation: 163228
Well hello there Grimless!
-isKindOfClass:
should work fine, it says so in the documentation: http://developer.apple.com/library/mac/#/library/ios/documentation/Cocoa/Reference/Foundation/Protocols/NSObject_Protocol/Reference/NSObject.html
But there is another class method in NSObject
called +isSubclassOfClass:
that you should use instead.
Upvotes: 1