开发者

UINavigationController pushViewController

开发者 https://www.devze.com 2023-03-03 19:50 出处:网络
I am working though a quiz app using a navigation controller and a child table view controller. I want to serve up the same child xib screen for each question.

I am working though a quiz app using a navigation controller and a child table view controller. I want to serve up the same child xib screen for each question.

Each time I present a new question, the prior screen remains on the stack. And when I hit the back button, it takes me to the prior screen / question, but I want to go back to 开发者_JAVA技巧the root controller's main screen instead. Do I need to override the navigation bar back button, or implement a customized popViewController? Or should I not be using pushViewController method?


You should replace the view controller's navigation item's leftBarButtonItem with a custom UIBarButtonItem that you can use to pop the navigation controller to the root view controller.

0

精彩评论

暂无评论...
验证码 换一张
取 消