objective c - How to determine whether class B is a subclass of class A? -


It seems that if you develop for Mac OS, then 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).

My current solution is to put a method - (zero) iAmClassB there, and execute a responses: iAmClassB , but it sounds like a contractor is. Am I missing something?

This is the version of iOS 2.0 and later SDK

  if ([ Classby Hashbys of Class: [Classes Class]]) {NSLog ("Yes Class of Class" is class of sub-class "); }   

:

isSubclassOfClass:

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

Yes If the received class is a subclass or is similar, then aclass , Otherwise not .

Availability

Available in iOS 2.0 and later.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -