简体   繁体   中英

iOS9 Navigation Bar Back Button not working

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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM