问题
Everything works perfectly before iOS 9.
However, when the app is running on iOS 9, nothing happens when back button is tapped so I am not able to go back as well as it keeps greyed out.
Also, I am not able to segue to the next view after the first segue.
For example,
HomePage -> tap a button to segue to view 1 -> Segued to View 1
-> tap on a button to segue to view 2 -> nothing happens
I uses the code below to perform segue,
UIViewController *push =
[self.storyboard instantiateViewControllerWithIdentifier:@"storyboard_id"];
[self.navigationController pushViewController:push animated:YES];
This issue only happens at iPhone
but the app works flawlessly when running on a simulator.
Thank you for your help.
回答1:
I came across a similar issue (possibly the same).
For me the details are that I was building using Xcode 6.4 then testing on iOS 9.
Upgrading to Xcode 7 and iOS 9 SDK resolved the issue.
回答2:
Finally, the problem is solved. I have been create a new project and use the same method to perform segue and it segued flawlessly. So I excluded the possibility of Xcode might cause the problem. And I found that I have passed the device token for apps at my app delegate by a NSRunLoop, I don't why it will cause such a weird problem, I decide to save the device token at NSUserdefault, then get it at the home page and parse it to server. So it works like a charm now after I take away the NSRunLoop now.
来源:https://stackoverflow.com/questions/32675414/ios9-navigation-bar-back-button-not-working