码迷,mamicode.com
首页 > 其他好文 > 详细

动态识别类型

时间:2015-11-04 16:06:57      阅读:97      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!