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

- (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

转载于:https://www.cnblogs.com/iOSCain/p/4015672.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值