Problem while multiple pop and push operation performed on UINavigationController programmatically with animation NO. ( iOS7 iPhone Only )
Source Code https://github.com/abhishek9284/NavigationBarTest
To understand problem consider following view tree.
( I use UITableViewController in my application )
Right click and select open image in new tab to see large image.
Bug Info
Right click and select open image in new tab to see large image.
Bug/Problem occurs while performing following navigations.
in above step 2 and 3 pop and push done programmatically with animation NO, which makes UINavigationBar back button and title very strange.
NOTE : Above problem occurs only in iOS 7 & work perfectly in iOS 6.
★☆★ SOLVED ★☆★
Reason for problem
Doing push or pop inside -(void)viewDidAppear:(BOOL)animated method makes navigation stack unstable.
Solution
Create separate method for push or pop related process and call that method from another view controller (avoid push or pop inside -(void)viewDidAppear:(BOOL)animated)
After push operation call method [self.navigationController.view layoutSubviews]; which lays out subviews.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With