开发者

iPhone view navigation - any clever ideas?

开发者 https://www.devze.com 2022-12-21 03:03 出处:网络
I have an app that is built starting from a tab bar controller. It\'s possible for the user to bring up other screens that are loaded with:

I have an app that is built starting from a tab bar controller. It's possible for the user to bring up other screens that are loaded with:

[self.navigationController pushViewController:nextSCreen animated:YES];

The user travels several levels deep this way.

Eventually I want to be able to jump back to the original screen. I can't use:

[self.navigationController popViewControllerAnimated:TRUE];

because it only returns me one level. I haven't been able to use

[self.navigationController popToViewController:whereIStarted animated:YES];

because I'm not sure how to get the right value for whereIStarted. Remember this is a specific tab fr开发者_如何学编程om the tab bar controller.

Does anyone have any suggestions?

Tell me if I'm unclear. Farsi is my first language.


If you're trying to get back to the root controller, you can use:

[self.navigationController popToRootViewControllerAnimated:YES];
0

精彩评论

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

关注公众号