【发布时间】:2011-05-14 18:59:38
【问题描述】:
如果我有一个设置了目标的 UIButton,有没有办法在不显式调用的情况下调用此方法?
例如:
[newViewController.button addTarget:self action:@selector(MyMethod) forControlEvents:UIControlEventTouchUpInside];
然后我希望在newViewController 中调用此方法,但不能因为MyMethod 属于父视图。所以我真的很想说,只需调用 UIButton 按钮上的方法/目标。但是我该怎么做呢?
谢谢
【问题讨论】:
标签: iphone objective-c methods uibutton target