开发者

Issue related to state maintenance

I have 10 views with UINavigationController in hierarchy. Now when I want to go back from 10 to 9, and so on with back button, which method should I use?

  1. popviewController
  2. popToViewController

I have set a fixed value for all views. At application launch, I get that value. For that value I initialize rootviewController with use of UINavigationController. And my rootviewController is nothing but the first view and af开发者_JAVA技巧ter that on next line, I'm pushing a particular view.


If you're pushing the views onto a UINavigationController, you don't need to explicitly set any method for the back button that the UINavigationController object manages, since it will pop the correct view when tapped. It's all automatic.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜