So, My problems lies with the tabbed navigation bar (The bottom navigation bar with icons). Is there a way to make this static so that it shown on all view controllers/ screen, including ones that do not contain a main link.
If you check the image below, I have a view controller connected to tabbed navigation bar that displays that view controller icon. I then have another view controller connection to that view controller, and I would like to make the tabbed navigation bar show on this ...
Is this possible to do? I'm not sure if it requires code, or just adding a few things to the storyboard. Any advise would be appreciated.
Many thanks in advance!
The Storyboard of my application (I'm not important enough to embed images just yet :( )
As long as you are presenting the View Controllers with the "Push" method, and not the "Modal" method, the tab bar controller should stay at the bottom of the screen.
Related
How can I arrange View Controllers on a Storyboard in Xcode's Interface Builder? When I try to select a View Controller, the mouse pointer grabs a view inside it instead.
Well, it wasn't obvious, at least for me. You should drag the white bar above the View Controller (the bar that contains the First Responder). It works even on low zoom levels!
I am using Swift 3, Xcode 8.2, developing for iOS 10.
I've got a storyboard that looks like this.
The left view controller is one of three child view controllers part of a tab view controller. The right view controller is a view controller that reveals when "Continue" is clicked.
However, when clicked, the right view controller takes up the whole view and the tab bar at the bottom disappears. There is a "Back" button at the top which is good and I would like to keep that but how do I get the tab bar back?
The problem is not reproducible based on what you've said. On the contrary, when I set up a storyboard Tab Bar Controller -> Nav Controller -> VC1 -> (push) -> VC2, the tab bar is still there when I go to VC2. I can only conclude that there's some misconfiguration in your storyboard that you have not described accurately.
Can anyone please tell me how to fix the following issue.
I am building an iPhone app using Storyboard. I have a Navigation Controller as root view and off that a view controller. On this I have a few buttons that when clicked takes you to a table view controller. All fine and well, but when I link the buttons to their respective table views, the top navigation bar obscures the top cell in the table view controller.
Does anyone know why this is happening and how I can fix it?
Also it seems to have thrown off my layouts from the view controller from which they inherit.
See attached image for a better explanation perhaps.
I believe this is the intended behavior when using the translucent navigation bar. It's semi transparent specifically so that you can see items pass behind it (e.g. a table scrolling). If you don't want this, changing the navigation bar's style to opaque should solve the problem.
Since I wanted to keep the translucence, I just added a UIView between the navigation controller and the prototype cell (width of the view, height 60). That way the first cell in the table starts beneath the navigation bar but I can still see the scrolling underneath.
This is a bug/feature in IB when you use a translucent navigation bar, the content view runs under the navigation bar. For non transparent bars the content view begins after the bar. If your content view is a UIScrollView (UITableView is a descendent of UIScrollView) the content will be automatically scrolled so as to not be hidden under the navigation bar. So the problem only exist in IB when you run the app everything should be ok.
You just need go to the Navigation Controller properties, then Simulated Metrics, and change the Top Bar to be a Transluscent Navigation Bar WITH PROMPT. And that should be it. No need for that extra UIView
I'm using Xcode 4, but not Storyboards
We have a navigation controller instantiated in the app delegate.
When we create view controllers with Xibs the xibs are views that are the height of the iphone (without the navigation bar). Putting content in this area is deceptive as there is actually 44pt's less space (the height of the nav bar) which gets put there by the navigation controller.
Therefore how do we remove the room where the nav bar should be in interface builder?
I can click the view and then change the "top bar" to "navigation bar" which will work, but I cannot add bar button items to this navigation bar, which makes me think that this is not the correct way to do it.
Can anyone let me know what the best way to do this is?
Many thanks
When you push your controller or use it to init the navigation controller, the navigation controller should take care of resizing at run time. The area in IB where you set the top bar is under the heading "Simulated Metrics" and is meant to give you a preview of what your selected interface elements will do to your available display area. The "Simulated" part is why you can't put items into that bar.
The real navigation bar should be configured wherever the navigation controller is defined, whether in code or a xib.
So my problem is that I would like to add a Tab bar to my existing Master View.
Also My search bar won't stay on top.
Here are some images of the storyboard
I hope I've understood your problem.
Keep in mind that Tab Bar Controllers and Navigation View are also View Controllers (VC) to serve other VCs. Saying so, you have to organize your story board controllers in order to have the Tab Bar Controler as the root VC and a Navigation VC as parent of your master view in order to keep the master/detail navigation.