• isKindOfClass

Returns a Boolean value that indicates whether the receiver is an instance of given class or an instance of any class that inherits from that class.

1
2
// 调用该方法的对象是aClass或其子类的一个对象,则返回YES;否则返回NO;
- (BOOL)isKindOfClass:(Class)aClass;
  • isMemberOfClass

Returns a Boolean value that indicates whether the receiver is an instance of a given class.

1
2
// 调用该方法的对象是参数类的一个对象,就返回YES,否则返回NO
- (BOOL)isMemberOfClass:(Class)aClass;
  • isSubclassOfClass

Returns a Boolean value that indicates whether the receiving class is a subclass of, or identical to, a given class.

1
2
// 调用该方法的类是aClass的子类或与aClass相同,则为YES,否则为NO。
+ (BOOL)isSubclassOfClass:(Class)aClass;