首页 > 其他 > 详细

isKindOfClass isMemeberOfClass 的区分

时间:2015-05-13 12:31:44      阅读:128      评论:0      收藏: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.

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

 

但是这样尽量少使用吧, ruby说duck typing.比较少依赖类型。

isKindOfClass isMemeberOfClass 的区分

原文:http://www.cnblogs.com/studyNT/p/4499989.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!