How to “restart” application ios

前端 未结 1 769
后悔当初
后悔当初 2021-01-23 17:42

So I have an app where a user goes through 3 view controllers and then submits a picture to Facebook. After they submit it to Facebook, I want them to be able to choose to rest

相关标签:
1条回答
  • 2021-01-23 17:58

    OK, because you haven't been clear about your navigation patterns, I'll show the two kinds of transitions and their opposites:

    Push-Pop: Is created by pushing a new UIViewController onto the navigation stack using

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

    It is counteracted by

    [self popToRootViewControllerAnimated:YES];
    

    Modal View: Is created by presenting a new UIViewController over the current one.

    [self presentModalViewController:exampleController animated:YES];
    

    It is not on the navigation stack, so the possibility of presenting another modal view within the first modal view is not available. It is counteracted by calling

    [self dismissModalViewControllerAnimated:YES];
    

    from within the modal view itself.

    0 讨论(0)
提交回复
热议问题