objective c - How to determine whether class B is a subclass of class A? -
It seems that if you develop for Mac OS, then My current solution is to put a method This is the version of iOS 2.0 and later SDK : returns a Boolean value It indicates that the received class is similar to the subclass or same class of a given class. / P> A class object. Return value Availability Available in iOS 2.0 and later. NSObject in
SubclassOfClass method but when I check the reference of the IOS class for the same class, there is no way in it (and complains about the Xcode method).
- (zero) iAmClassB there, and execute a
responses: iAmClassB , but it sounds like a contractor is. Am I missing something?
if ([ Classby Hashbys of Class: [Classes Class]]) {NSLog ("Yes Class of Class" is class of sub-class "); }
isSubclassOfClass:
Yes If the received class is a subclass or is similar, then
aclass , Otherwise
not .
Comments
Post a Comment