DEFINE CLASS INTROSPECTION

Tarun Kumar

Total Post:107

Points:535
Posted by  Tarun Kumar
 692  View(s)
Ratings:
Rate this:
  1. Tarun Kumar

    Post:107

    Points:535
    Define Class Introspection

    -          Determine whether an objective-C object is an instance of a class:

             [obj isMemberOfClass:ColorClass];

    -          Determine whether an objective-C object is an instance of a class or its descendants:

             [obj isKindOfClass:ColorClass];

    -          The version of a class:

             [ColorString version]

    -          Find the class of an Objective-C object:

             Class myClass1 = [obj1 class];

             Class myClass1 = [NSString class];

    -          Verify 2 Objective-C objects are of the same class:

             [obj1 myClass2] == [obj2 class]

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!