Recently did the demo bug appeared, I think this bug appeared very classic so post it to everyone to see,
The Bug demo is: Clicking the Back button fails with the following GIF illustration
Why will appear so wonderful bug, the system's return key incredibly ineffective, embarrassing and committed, Leng point for a long time also overwhelmed
The source of the bug: When you never hide the navigation bar to return the gesture, the gesture returns half let go, back to the page without hiding the navigation bar, on push other pages, there will be a return key failure problem
Important steps to a bug: gesture return half and let go
The code for the page-hide navigation bar is as follows
// Show navigation bar [Self.navigationcontroller Setnavigationbarhidden:no Animated:no];
// Hide Navigation bar [Self.navigationcontroller Setnavigationbarhidden:yes Animated:no];
Personally think that the cause of the bug is that when the gesture returned when the navigation bar page is animated (can be used to try other apps), the page title and button will be gradient
The animated that hides the navigation bar and the code that displays the navigation bar is no, so the return of the gesture conflicts, causing problems with the entire navigation controller page and the return key.
The solution is simple, just set the No to Yes.
Show navigation bar [Self.navigationcontroller setnavigationbarhidden:no Animated:yes];
Hide Navigation bar [Self.navigationcontroller setnavigationbarhidden:yes Animated:yes];
The perfect solution to the bug, will not come again ~ ~
About iOS navigation controller hide and show a return key is invalid, navigation bar title animation exception