How to go to “Home-page” in iOS App?

前端 未结 1 773
谎友^
谎友^ 2021-01-26 01:14

I have UIViewController and UITabBarController. UIViewController contain 5 buttons and UITabBarController has 5 Tabs.

相关标签:
1条回答
  • 2021-01-26 02:04

    I suggest you to take a one Navigation Controller as a parent.
    Then, add your Startup View as a root view of it.

    Application Flow Suggestion

    On your main view controller page,

    - (void)viewWillAppear:(BOOL)animated
    {
       self.navigationController.navigationBarHidden = NO;
    }
    

    So, it will hide your main navigation. So no need to worry for this internal navigation flow.
    And for internal navigation, you have already taken different navigation controllers.

    By using code:

    [self.parentViewController.navigationController popToRootViewControllerAnimated:YES];
    

    you'll be at root of the application and it will poped out all view controller which were stacked in application.

    Hopefully, you'll understand flow & will apply if you feel good.

    Enjoy Coding.
    Thanks.

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