参考这个https://www.jianshu.com/p/25fd027916fa
最终选择了这个库:
https://github.com/onegray/UIViewController-BackButtonHandler
- (BOOL)navigationShouldPopOnBackButton { [self showBackAlert]; return NO; }
调用这个方法,返回NO,然后做自己的操作,比如弹窗什么的
参考这个https://www.jianshu.com/p/25fd027916fa
最终选择了这个库:
https://github.com/onegray/UIViewController-BackButtonHandler
- (BOOL)navigationShouldPopOnBackButton { [self showBackAlert]; return NO; }
调用这个方法,返回NO,然后做自己的操作,比如弹窗什么的