Apple has always been in human-computer interaction to achieve the ultimate, in the iOS7, the new addition of a small function, This is the api:self.navigationController.interactivePopGestureRecognizer.enabled = YES; This API function is in the Navigationcontroller stack Uiviewcontroller can support the right-hand gesture, that is, do not click the Back button in the upper right corner, gently on the left side of the screen slide, the screen will return, as the iOS device screen increases, This small function makes the fingers short, the thumb large and the hand-disabled people see the Gospel. This function is good, but often we will have the need to customize the return button, if you manually customize the return button, this function will be invalidated, that is, the custom Navigationitem Leftbarbuttonitem, then this gesture will be invalidated. Workaround find two types of 1. Reset gesture Delegate
Self.navigationController.interactivePopGestureRecognizer.delegate = (id) self; |
2. Of course you can also respond to events of this gesture yourself
[self.navigationcontroller.interactivepopgesturerecognizer addtarget:self Action: @selector (handlegesture:)]; |
There are more ways to continue to add, here you can choose according to their own needs, if simply customize the return button, the first one of the simplest, a code to do.
IOS7 Navigationcontroller Right slip gesture problem