首页 > 其他 > 详细

动态识别类型

时间:2015-11-04 16:03:54      阅读:207      评论:0      收藏:0      [点我收藏+]

-(BOOL) isKindOfClass: classObj

is object a descendent or member of classObj
此对象是否是 classObj 的子孙或一员

-(BOOL) isMemberOfClass: classObj

is object a member of classObj
此对象是否是 classObj 的一员

-(BOOL) respondsToSelector: selector

does the object have a method named specifiec

by the selector
此对象是否有叫做selector 的 method

+(BOOL) instancesRespondToSelector: selector

does an object created by this class have the

ability to respond to the specified selector
此对象是否是由有能力响应指定 selector 的对象所产生

-(id) performSelector: selector

invoke the specified selector on the object
唤起此对象的指定selector

动态识别类型

原文:http://www.cnblogs.com/PJXWang/p/4936268.html

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