开发者

connecting events to actions during runtime

i know how to create a control during runtime, my controller class has a IBAction method inside it. How do i connect the event associated with a control to the IBAction method. Just like ctrl+drag inside Interface builder except during runt开发者_开发技巧ime


Suppose you want to "connect" a UIControl control to the IBAction -touchUpInside: of the application delegate self:

[control addTarget:self action:@selector(touchUpInside:) forControlEvents:UIControlEventTouchUpInside];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜