开发者

Calling Button-Clicked Function From Code

I have a function set up in my code like so:

-(IBAction) buttonClicked: (id) sender{

//various expressions开发者_运维技巧 here

}

The question is, how can I call this buttonClicked() function from somewhere else in the code, without requiring a user click the button. For example, how can I call it from viewDidLoad()?

Thank you for any help.


If you're calling in the same file, you can use:

[self buttonClicked:self];

Depending on what your method does.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜