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.
我正在尝试将后退按钮设置为UIBarButton,但IBAction无法正常工作。我不确定出了什么问题。任何人都可以让我知道。
UIBarButton
IBAction
-(IBAction)back:(id)sender { // Tell the controller to go back [self.navigationController popViewControllerAnimated:YES]; }
只需将您的背部方法替换为:
-(IBAction)back:(id)sender { // Tell the controller to go back [self dismissModalViewControllerAnimated:YES]; }
希望你的问题得到解决。
享受 ...!!!