美文网首页
iOS isKindOfClass 和 isMemberOfC

iOS isKindOfClass 和 isMemberOfC

作者: 敬畏CODE | 来源:发表于2020-12-18 10:12 被阅读0次

    isKindOfClass:

    returns YES if the receiver is an instance of the specified class or an instance of any class that inherits from the specified class.

    大白话就是:若是调用着是指定类的实例或者是指定类的子类实例就返回YES

    isMemberOfClass:

    returns YES if the receiver is an instance of the specified class.

    大白话:如果调用者是指定类的实例就返回YES(PS:注意不包含子类

    相关文章

      网友评论

          本文标题:iOS isKindOfClass 和 isMemberOfC

          本文链接:https://www.haomeiwen.com/subject/qzlxnktx.html