我正在尝试通过它自己的按钮调用连接到按钮的操作。这可以做到吗?为了澄清我的观点,我的意思是:
[self.button callIBAction:self]
最佳答案
您需要发送触发按钮的事件,例如:
[self.button sendActionsForControlEvents:UIControlEventTouchUpInside]
或者,如果您在实现该操作的同一 View Controller 中:
[self callIBAction:self.button]
关于iOS通过按钮调用按钮 Action ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19730593/