Add ViewController to Tab Bar Controller without Tab Bar Item

Discussion in 'iOS Programming' started by gegy, Feb 23, 2018.

  1. gegy macrumors newbie

    Feb 23, 2018
    Hi there,

    i am new to swift (ios) development. I am coming from the windows world Dev.
    I hope you can help me.

    I have started an application with contains a Tab Bar controller with 5 Tab Bar Items. Each of them has a Naviagion Controller with their view controllers.
    So now i want to get the following:

    When the application launches (not geting to foreground again) it should show an "initial" view. The initial view controller is not a part of the Tab Bar Controller, but the Tab Bar Controller should also been shown.
    The view should act as a homescreen. On launching the app and on touching a "home" button on any Navigation Controller it should be appear.
    How can i load this view to the Tab Bar Controller? Or should i load the Tab Bar Controller to the view?

    Here is my storyboard. The left view should be the homescreen.
    Bildschirmfoto 2018-02-23 um 11.42.47.png
  2. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    So you want to have two different ways of navigating? The tabs and this home screen? If you can do all your navigation using the tabs that will probably be better.

    Otherwise you might think about using a modal view that slides up from the bottom of the screen and covers the tabbar controller.
  3. gegy thread starter macrumors newbie

    Feb 23, 2018

    The first task was to show the Homescreen (on the left side of the storyboard) when the app launches, but not when the user touch the first tabbar controller item. I solved this by overlaying the homescreen on the presented view of the first tab bar item and used a flag, which is stored in the application delegate. After launching the flag is changed and the original view of the first tab bar item is shown when touching the item.
    This homescreen should the appear when the user touches a "homebutton" in the navigation controller. It is no problem when the tab bar is shown at this moment.
    The idea using a modal view sliding up sounds also interessting. i will do a search on the internet for how to do that.

Share This Page