diff --git a/Lighting/Class/ClientViewController.m b/Lighting/Class/ClientViewController.m index b85b716533f130bdaccd577df92ada6078705a56..6b4dbc3b6d19237e6ae5015c3dc7146968e3ba52 100644 --- a/Lighting/Class/ClientViewController.m +++ b/Lighting/Class/ClientViewController.m @@ -22,6 +22,28 @@ [self uiConfigAction]; } + +- (void)viewDidAppear:(BOOL)animated +{ + [super viewDidAppear:animated]; + + // ç¦ç”¨ iOS7 返回手势 + if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { + self.navigationController.interactivePopGestureRecognizer.enabled = NO; + } +} + +- (void)viewWillDisappear:(BOOL)animated +{ + [super viewWillDisappear:animated]; + + // å¼€å¯ + if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { + self.navigationController.interactivePopGestureRecognizer.enabled = YES; + } +} + + #pragma mark -布局 - (void)uiConfigAction { diff --git a/Lighting/Class/Shoppingcart/ShoppingViewController.m b/Lighting/Class/Shoppingcart/ShoppingViewController.m index 8fbb19e4965e54a9f9a2b19c298e40fbb1f1bf06..45343bb7b1f7f6145d7b34450371117cfa5f41ce 100644 --- a/Lighting/Class/Shoppingcart/ShoppingViewController.m +++ b/Lighting/Class/Shoppingcart/ShoppingViewController.m @@ -44,6 +44,26 @@ } +- (void)viewDidAppear:(BOOL)animated +{ + [super viewDidAppear:animated]; + + // ç¦ç”¨ iOS7 返回手势 + if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { + self.navigationController.interactivePopGestureRecognizer.enabled = NO; + } +} + +- (void)viewWillDisappear:(BOOL)animated +{ + [super viewWillDisappear:animated]; + + // å¼€å¯ + if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { + self.navigationController.interactivePopGestureRecognizer.enabled = YES; + } +} + #pragma mark - UI - (void)uiConfigAction