Is there a way to show UINavigationController in the second storyboard if that UINavigationController in the first storyboard? - swift

I have the first storyboard has UINavigationController its continues to the second storyboard but it doesn't appear there only when running the app.
I link between storyboard by (Storyboard Reference)
The first storyboard
The second storyboard
The UINavigationController doesn't appear in the second storyboard its appear only when running the app.

according to navigation controllers property it will not show the navigation bar in your case , if you want to edit or customise navigation items or navigationbar then you have to make changes programatically .
but to make changes in navigationbar or navigation items there is some limitations sometimes you can't fully customise it and sometimes you customise it depend on your requirement ... :(
I suggest you that use navigation property but hide the navigation bar
and on place of navigation bar (on top of every view controller) set a
view which will look like navigation bar and you can easily customise
it as per your requirement .

This is normal behaviour of the Storyboard as the controller in your second storyboard does not know if it is a controller in a navigation controller, hence it does not show the navigation bar. If yo want to show the navigation bar in the storyboard you can select it in the Simulated Metrics in the Attributes Inspector (shown here in that thread). You can see it working by giving the controller a title for example.

Related

Show UITabBar on UIViewControllers that are not part of the UITabBar?

I have an iOS app written in Swift with UITabBarController with 5 UIViewControllers. Now, I have a bunch of UIViewControllers that are not part of the UITabBarController. I'd like to be able to show that same tabbar but I have no idea how to do that. Any clue?
More details: This is one of the View Controllers that the tabbar has. I use storyboard references and split my view controllers into separate more manageable storyboards.
So, the big picture:
There's no initial ViewController since I use storyboardId to get to the initial Navigation Controller. From there we have a ViewController embedded in the same Navigation controller. In that ViewController, there are 2 Container views - one of the size of the bottom ViewController that contains the "hamburger" button that toggles the other Container View which has an embedded UITableView in. When a specific cell is selected it should go to Profile ViewController that's not even in the same storyboard. The segue is set to be Push. Either way, doesn't show the UITabBar on the Profile ViewController
how you doing?
I don't know if I understood, but you are trying to show tabbar after going to another screen, right? If the answer is 'yes', try to change your segue to show(e.g. push).
-----Edit-----
You can do with two ways:
Presenting Modally -> using Current Context
Use push(e.g.) with a navigation view controller, you can also hide the navigation bar if you go to Navigation controller -> Attributes inspector -> Navigation Controller -> Uncheck Shows Navigation Bar
Hope now it works!
Best regards

Interface builder's not showing the navigation controller's navigation bar inside a UITabBarController

I recently switched to Xcode 4 from 3.2 and so far everything's been fine. There's one thing that's driving me nuts for the last hour or so. In my main window xib, I have a Tab Controller with 4 tabs. Three of them are regular UIViewControllers, but one is a UINavigationController. The problem is that with Xcode 4's Interface Builder, I can't see the navigation controller's navigation bar. I just get a window that says "Address List Table View Controller inside of a Contacts Navigation Controller". Why doesn't Xcode show the nav bar? In Xcode 3's IB I could see it, add buttons, change the title, etc. I can't seem to do that here.
If you watch this video, the person drags a UINavigationController into the tab bar and you see the bar just fine.
http://www.youtube.com/watch?v=aSBK8Zz6O4M
I set the custom class to my ContactsNavigationController, and the changes I make in the nav controller's xib don't reflect in the tab controller like the regular view controller's xib changes do.
So, I'm a little confused. I'm not new at this, I've been at Xcode programming since Day One, but I'm quite lost as to why the nav bar doesn't show up in the tab controller's view, and why when I set the nav controller to my custom class (even set the nib file), it doesn't work. Everything else does.
i just had this issue on an older project. i changed the size in the properties for the root view controller and this seems to have flushed interface builder, including it showing the navigation bar on views that were linked to nav controllers, but in IB had no nav bar displaying

IOS Storyboard when to use navigation controllers?

Hi I'm new IOS and have been using the storyboard feature, I followed this tutorial which resulted in a working app. I'm slightly confused when to use a navigation controller. In the tutorial above, every tab had a navigation controller. Is this necessary?
I'm in the process of creating a new app and it seems to work whether I add a navigation controller or not to each tab (see pic).
I'm just curios what is the correct process?
Thanks.
As your app is using a UITabBarController each tab will display a separate 'branch' of views. If any of these 'branches' needs its views to be wrapped in navigation functionality (or simply display the navigation bar with a title etc) then you would add a 'UINavigationController` as the primary view controller for that tab, in between the tab bar controller and the first view controller you wish to display for that tab.
If you want a tab to simply display a view controller which doesn't need hierarchical navigation or a navigation bar then you wouldn't need to use a UINavigationController and can directly set your view controller as the controller for that tab.

change position of UITabbarController's Tabbar

I am working with TabBarController application and my requirement is to add a TabBar at the top of the window rather than default bottom. Can somebody help to add the TabBar at the top of the window while using UITabbarController rather than simple tabbar.
I think that is not permitted when using UITabBarController. From the official docs, about tabBar property:
"You should never attempt to manipulate the UITabBar object itself stored in this property. If you attempt to do so, the tab bar view throws an exception. To configure the items for your tab bar interface, you should instead assign one or more custom view controllers to the viewControllers property. The tab bar collects the needed tab bar items from the view controllers you specify.".

Creating the view with Interface Builder, when using Navigation Controller

I'm creating an UIViewController in IB. And I want to use this controller with a UINaviagationController.
The problem is when I use this view controller with the navigation one the title bar appears and all the elements on view go down. Ho can I take account of this when creating the controller in IB ?
PS: Now, I just put everything a bit higher. But I don't think it's a right way.
In IB select the view controller view, open the inspector, select the View Attributes tab, and on Top Bar specify "Navigation Bar". This will make a Navigation Bar in the view and then you'll be able to place your subviews in the remaining content.
In the same way you can inform IB if your view will contain the status bar, the tab bar, a prompt.