Same tab bar on every view - ios

I'm trying to create an app with three primary views (maybe even more in the future) that you can always get to from anywhere.
The tab bar controller works great for that, I have 3 icons in the bar for every view. However, when branching off from any of those to other modal views, the tab bar is obviously no longer there.
I got around it by embedding one view in a container, so it is not overlapping the tab bar, but I cannot do the same thing for another view. (fx. on the screenshot you can see Zastavky Table View, I would like to be able to get to another view by clicking cell in this one, yet still have a tabbar on the bottom)
Screenshot of storyboard:
Do you guys have any idea how this could be done? Is my whole concept wrong here? Thank you very much! :)

Use navigation with show segue.
UITabBarController
|--UINavigationController
| `--UIViewControllerA
|--UINavigationController
| `--UIViewControllerB
`--UINavigationController
`--UIViewControllerC
This construct may help you.

Related

Implementing a back button without navigation controller

I'm kind of new to programming in swift and in general in xcode. I'm creating my first app and i've run into this issue that i cant seem to find a fix for online..
my first scene is a view controller with two buttons where you pick a language and it redirects you to the appropriate tab controller in that language.. now I'd like to add a back button to those tab controllers in order to go back in case you picked the wrong language.
what I've tried so far doesn't really work..
I have tried using a navigation controller but they dont show on the first view controller so that doesnt help me, ive tried putting just a navigation bar and adding a navigation item (see pictures below) but the back button isnt rendered correctly and cannot be reached..
help is much appreciated !!
You can use first UIView and set top constraint 0 with safe area. See image
Hope it helps.

Gap Above Bottom Tab Bar - Embedded NavigationController + Embedded TableViewController

This issue has had me stumped for a few days.
This is my relevant storyboard layout:
I have set every layout under the sun to all three View Controllers and still get a resultant Table View with a "gap" above the Banner View - seemingly the same height as the Banner View. As follows:
One thing that did work was to drag the Container View over the bottom Banner View like this:
And the result renders perfectly on my test device as well as every simulator - i.e. no gap.
But such a solution is essentially a hack of sorts and I'd like to see if there is anything I can do to properly fix the issue.
For the record, I have tried every option in the IB - adjust scroll view insets, extend edges under top/bottom bars, etc... as well as various code snippets I have googled here and there. Nothing seems to solve the issue for me.
I managed to solve the gap at the top of the table view under the nav bar (seemingly a common issue with a lot of content out there). But there does not seem to be so many cases like mine above.
Any help or indications are greatly appreciated. Thank you people :-)
* ADDITIONAL INFORMATION *
As per a comment below, I add the constraints I have tried for the said container:
I had similar gap problem, when used ContainerView to embed StoryboardReference - to support StoryboardReference from UITabBarController on iOS8.
I have resolved this by turning on Extended Egdes -> Under OpaqueBars checkbox on view controller with container view, like on image:
The red UIView is ContainerView, first ViewController in StoryboardReference is UINavigationController.
OK. Essentially, with the kind assistant of #beyowulf I realised my current setup had to be changed.
I was
unnecessarily using a container view in your tabbarcontroller
as he correctly indicated
there is no way for your table view controller to infer it's in a
tabbarviewcontroller.
In order for my table view controller to be flush with the bottom of the container view, I had to
directly embed your navigation controller in your tabbarviewcontroller
and adjust the bottom inset of your table view.
I did this via the top menu bar items:
Select the TableViewController
Editor > Embed in - - - > Tab Bar Controller.
You can easily incorporate a navigation controller into the storyboard thereafter if you wish to do so, which I did also.
A handy tip and one I followed to solve my 'gap' issue appearing above the bottom tab bar.
Hope this helps anyone who might also be facing the same issue.
Thanks again to #beyowulf.

Swift Two Tab Bars shown and not sure why?

Does anybody know why I might have these stacked tab bar?
I don't see where this would be in any of my view controllers and what code i would even look for. If guidance on what would even generate this would help. It's a fixed bar on the bottom and I'm trying to remove it. I am not sure when it started to show up here anyways. It serves no purpose for me. It also shows up on each of the tabs when I click on each of them.
You are using a searchBar, if you want just one bar you would have to move the searchBar to the top of the screen
hope this helps
I ended up figuring out what I did wrong. At some point, I clicked "shows toolbar" in the navigation controller that was embedded in the tab view controller. When I unchecked this the second toolbar went away.
Thanks for everyones help.

Navigation Controller not showing Root View (just white space)

long time lurker first time poster here. My question is about Navigation Controllers in Xcode 6.1.1.
Basically I've created a feed app that grabs posts from my Wordpress Site and shows them in a table list. When an item from the list is selected, a web view shows the url from the selected item. I want to manage moving between these two views (table and webview) with a navigation controller, so I embedded one into the table list view on my storyboard establishing the table view as the Root. When I run the app, I get a blank screen with an empty navigation bar at the top of the screen (nav controller is set to initial view). I expect to see the list view inside the controller but I get nada. In the past I've been able to do this without writing any code and it's worked no problem.
Not sure why this is happening, but I'm sure it's something really simple that I'm overlooking. Any help would be awesome. Thanks for looking.
Fixed the issue. I knew it was going to be something really small. All I had to do was add a Navigation Item to the Table View Controller. Once I gave the nav item a title, I embedded the Navigation Controller and everything works as expected now.
I got the idea by throwing a navigation controller object onto my story board and cross referencing the canned relationship against my own and that's the only thing that was missing. Thanks for all your help.

Navigation bar tutorial

First, sorry for my bad English. I'm really beginner at App development and I'm doing an app with three views.
The first and the second ones are switched by a Tab Bar (and that's all right so far).
The first it's gonna be the only one which leads to the third view (which will be only a image) through a Navigation Bar.
This nav bar in the first view will have one button to go to the third view, and in the third view the nav bar will have a button "back" (and here's the problem).
I'm putting a nav bar in the first view and I try to put a Nav item into it, but they don't let me! How can I do it ? I can't find a good Navigation Bar's tutorial whithout storyboard (I'm not using storyboards...).
Thank you.
take a look at these two tutorials
http://fuelyourcoding.com/how-to-add-buttons-to-your-ios-app-navigation-bar/
and
http://www.idev101.com/learn/navigation_controllers.html

Resources