We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@interface MainNaviVC : UINavigationController @end
@interface MainNaviVC ()<UINavigationControllerDelegate> @property (nonatomic, assign) BOOL pushing; //是否正在push @end @implementation MainNaviVC - (void)viewDidLoad { [super viewDidLoad]; self.isMotionEnabled = YES; // self.interactivePopGestureRecognizer.delaysTouchesBegan = NO; self.delegate = self; } - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated { if (self.pushing) { return; } else { self.pushing = YES; NSArray *whiteList = @[NSClassFromString(@"XTAddWebBrowserViewController")]; //可重复push白名单 if (![[super topViewController] isKindOfClass:[viewController class]] || [whiteList containsObject:[viewController class]]) { // 如果和上一个控制器一样,隔绝此操作 [super pushViewController:viewController animated:animated]; } } } - (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated { self.pushing = NO; } - (void)dealloc { self.delegate = nil; }
while i use UINavigationControllerDelegate, motion not work
The text was updated successfully, but these errors were encountered:
self.isMotionEnabled = YES; self.delegate = self;
Should be in reverse order:
self.delegate = self; self.isMotionEnabled = YES;
Sorry, something went wrong.
I can't push, because this delegate never in
- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated { self.pushing = NO; }
OrkhanAlikhanov
No branches or pull requests
while i use UINavigationControllerDelegate, motion not work
The text was updated successfully, but these errors were encountered: