Get back to the first screen of my iPhone app after transitioning through five screens

后端 未结 3 1878
一生所求
一生所求 2020-12-22 03:58

I\'m using multiple screens in my app. I wrote code for the moving from the first screen to the second screen, the second screen to the third screen, and so on up to the fif

相关标签:
3条回答
  • 2020-12-22 04:30

    [self.navigationController popToRootViewControllerAnimated:YES];

    [self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:0] animated:YES];

    You can use second line code then verify the index of view controller.

    and you have memory problem so please verify the any object release or not.

    0 讨论(0)
  • 2020-12-22 04:36

    Go through this best answer for you UINavigation controller

    0 讨论(0)
  • 2020-12-22 04:43

    if you use a UINavigationController

     [self.navigationController popToRootViewControllerAnimated:YES
    
    0 讨论(0)
提交回复
热议问题