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

NSObject中的performSelector:withObject用法简介

时间:2014-10-10 16:28:10      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:des   style   color   io   os   使用   ar   for   strong   

- (id)performSelector:(SEL)aSelector withObject:(id)anObject

Description

[说明]

Sends a message to the receiver with an object as the argument. (required)

[将消息发送到接收器与一个对象作为参数。(必填)]

 

This method is the same as performSelector: except that you can supply an argument for aSelector. aSelector should identify a method that takes a single argument of type id. For methods with other argument types and return values, use NSInvocation.

[这种方法是一样的performSelector:除非你能提供的aSelector参数。 aSelector应确定一种方法,它接受一个单一类型的id参数。与其他类型的参数和返回值的方法,使用NSInvocation。]

Parameters

[参数]

aSelector

A selector identifying the message to send. If aSelector is NULL, an NSInvalidArgumentException is raised.

[选择器确定要发送的消息。如果aSelector为NULL,一个NSInvalidArgumentException提高。]

anObject

An object that is the sole argument of the message.

[一个对象,它是消息的唯一理由。]

Returns

[返回]

An object that is the result of the message.

[一个对象,它是消息的唯一理由。]

Availability

[可用于]

OS X (10.0 and later)

Declared In

[宣称]

NSObject.h

Reference

[参考]

NSObject Protocol Reference

NSObject中的performSelector:withObject用法简介

标签:des   style   color   io   os   使用   ar   for   strong   

原文地址:http://www.cnblogs.com/iOSCain/p/4015583.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!