isKindOfClass和isMemberOfClass的区别

来源:互联网 发布:java实现两个数交换 编辑:程序博客网 时间:2024/05/18 00:37
<span style="font-size:18px;">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.isMemberOfClass: Returns a Boolean value that indicates whether the receiver is an instance of a given class.isKindOfClass和isMemberOfClass之间的区别是:我们可以使用isKindOfClass来确定一个对象是否是一个类的实例,或者是该类祖先类的实例。isMemberOfClass只能用来判断前者,不能用来判断后者。</span>

0 0
原创粉丝点击