[英]iOS call buttons action through the button
我试图通过它自己的按钮调用连接到按钮的动作。 可以这样做吗? 为了澄清我的观点,我希望我的意思是:
[self.button callIBAction:self]
您需要发送触发按钮的事件,例如:
[self.button sendActionsForControlEvents:UIControlEventTouchUpInside]
或者,如果您在实现该操作的同一视图控制器中:
[self callIBAction:self.button]
[self performSelector:@selector(yourIBAction:) withObject:nil];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.