In the development process, often use, need to close a page of the gesture return function.
//Disable return gestures- (void) Viewdidappear: (BOOL) animated{[Super viewdidappear:animated]; //Disable return gestures if([Self.navigationcontroller respondstoselector: @selector (Interactivepopgesturerecognizer)]) {Self.navigation Controller.interactivePopGestureRecognizer.enabled=NO; }}//Turn on gestures- (void) Viewwilldisappear: (BOOL) animated{[Super viewwilldisappear:animated]; //Turn on gestures if([Self.navigationcontroller respondstoselector: @selector (Interactivepopgesturerecognizer)]) {Self.navigation Controller.interactivePopGestureRecognizer.enabled=YES; }}//The navigation bar returns- (void) blackbtnclick{//open gesture, sometimes only in (void) Viewwilldisappear: (BOOL) animated Open, all gestures under the root column will be invalidated. if([Self.navigationcontroller respondstoselector: @selector (Interactivepopgesturerecognizer)]) {Self.navigation Controller.interactivePopGestureRecognizer.enabled=YES; } [Self.navigationcontroller Poptorootviewcontrolleranimated:yes];}
Reference website: http://blog.csdn.net/jasonblog/article/details/28282147
IOS UI Advanced-6.0 gestures