Define Class Introspection Tarun Kumar138319-Sep-2015iphoneiphone ios objective c Updated on 20-Sep-2020
Tarun Kumar
19-Sep-2015- 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]