isKindOfClass isMemeberOfClass 的区分

isKindOfClass

If you use such constructs in your code, you might think it is alright to modify an object that in reality should not be modified. Doing so might then create problems for other code that expected the object to remain unchanged.

If the receiver is a class object, this method returns YES if aClass is a Class object of the same type, NO otherwise.

YES if the receiver is an instance of aClass or an instance of any class that inherits from aClass, otherwise NO.

 

isMemberOfClass

YES if the receiver is an instance of aClass, otherwise NO.

原文地址:https://www.cnblogs.com/studyNT/p/4622947.html