iOS Question Hide TabController in one page (full screen) and display in others

Discussion in 'iOS Questions' started by Mike1970, Dec 2, 2019.

  1. Mike1970

    Mike1970 Active Member Licensed User

    Hi everyone.
    I structred my app like so:
    - Splashscreen (where I test the internet connection)
    - Login Page
    - Home Page

    I would like to use TabBarController (i already did other post in order to understand how to use this thing), but i need it only in Home Page.

    In splashscreen and Login Page i don't want the TabBar to be Visible (and usable), full screen.

    Only in Home screen (and the inside pages) i need a TabBar with three buttons (Settings, Chat, Home).

    So the question is: It's possibile to have the TabController only in certain pages? and have the others full screen?

    Thanks
     
  2. Semen Matusovskiy

    Semen Matusovskiy Well-Known Member Licensed User

    You can change a controller in any moment. To show tab bar, set App.KeyController = TabBarController. If you do not want to see a tab bar, restore NavigationController, received in Application_Start (App.KeyController = NavigationController)
     
    Mike1970 likes this.
  3. Mike1970

    Mike1970 Active Member Licensed User

    Nice trick.
    I tried, is it normal that in the moment I set the controller to TabBarControl it shows me the first page of the tabBar right?
     
  4. Semen Matusovskiy

    Semen Matusovskiy Well-Known Member Licensed User

    Looks strange. Do you re-use TabBarController or create new each time ?
    Anyway TabBarController has a SelectedIndex property (get, put). When you set to NavigationController, save SelectedIndex. Then restore it after setting to TabBarController.
     
    Last edited: Dec 3, 2019
  5. Mike1970

    Mike1970 Active Member Licensed User

    No, i create the tabar once (like in the example you gave me in the other post), in application_start, and then I set it has controller later with App.Keycontroller

    Anyway, thanks for the tip!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice