Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试通过它自己的按钮调用连接到按钮的操作。这可以做到吗?为了澄清我的观点,我的意思是:
[self.button callIBAction:self]
您需要发送触发按钮的事件,例如:
[self.button sendActionsForControlEvents:UIControlEventTouchUpInside]
或者,如果您在实现该操作的同一视图控制器中:
[self callIBAction:self.button]
[self performSelector:@selector(yourIBAction:) withObject:nil];