Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

gegy

macrumors member
Original poster
Feb 23, 2018
39
48
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
 
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.
 
  • Like
Reactions: gegy
Hey.

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.