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

NSObject的performSelector: withObject: withObject:使用简介

时间:2014-10-10 16:00:50      阅读:223      评论:0      收藏:0      [点我收藏+]

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

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

Description

[说明]

Sends a message to the receiver with two objects as arguments. (required)

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

 

This method is the same as performSelector: except that you can supply two arguments for aSelector. aSelector should identify a method that can take two arguments 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 first argument of the message.

[一个对象,它是消息的第一个参数。]

anotherObject

An object that is the second 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: withObject:使用简介

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

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

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