开发者

How to get caller if the function has no -sender parameter?

For example, there are functions named -(void)Foo, and -(void)Foo:(id)sender.

The -(void)Foo:(id)sender can get the caller from parameter, and my question is, how to get caller from -(void)Foo? Is t开发者_如何学Gohere any way to get the caller?


Please have a look at Objective C find caller of method. For what do you need it? The (id)sender parameter is passed directly by the method sending the message, there is no magic involved.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜