拦截导航栏返回按钮点击事件

参考这个https://www.jianshu.com/p/25fd027916fa

最终选择了这个库:

https://github.com/onegray/UIViewController-BackButtonHandler

- (BOOL)navigationShouldPopOnBackButton {
    [self showBackAlert];
    return NO;
}

调用这个方法,返回NO,然后做自己的操作,比如弹窗什么的

猜你喜欢

转载自www.cnblogs.com/tufei7/p/9372571.html