Change UINavigationBar with IB - iphone

I'm trying to change a UINavigationController navigation bar to my custom navigation bar (subclass of UINavigationBar) with IB.
So I have a xib file with a UINavigationController, but when I stand on the navigation bar and go to the inspector to change it's class, It shows me a UINavigationItem class not UINavigationBar, and I can't choose my custom navigation bar.
What am I doing wrong?

To answer my own question, I found the solution in this post
Only after I tapped on the "Show Document Outline" button (the rounded arrow at the left bottom), I could find the navigationBar under the navigation controller, and change his class.

Related

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

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.

Animate NavigationController transition without animating navigation bar

I have a typical ios app with a navigationcontroller. The navigation bar on the top has left and right buttons that stay the same through different views, so I would like to animate just the current view and not the top bar.
I'm not sure how to get started with this.
I've got an idea.
First, add your custom navigation bar on the top of the main view.
Second, add a navigationController as a subview under your navigation bar.
Now if the navigationController do the pushing or popping, your navigation bar will not change at all.

NavigationBar from NavigationController doesn't show in IB StoryBoard

My first view is a UINavigationController with a rootview, which correctly shows a NavigationBar in IB in the .storyboard. I think this is nice when I am designing in IB, so I know the proportions, since the view is getting a little smaller with a navigationbar. This navigationbar from the navcontroller is pushed on all views in my app, but in IB the bar doesn't show, making it hard to figure out how it's going to look. I have chosen 'inferred' which I thought ment the NavController should automatic implement it, it is ok to just choose 'navigationcontroller' as the top bar in the Simulated Metrics? In some of my viewcontrollers the navigationbar is there, and all settings are 'inferred'.
Thanks.
In each viewController in the StoryBoard file in the Attributes Inspector are several drop down menus.
One of them is "Top Bar".
If this is set to "Inferred" then the navBar will show only if it's parent view shows the navbar (parent as in the view that segues to it).
Somewhere in your hierarchy will be one that has the Top Bar option set to None (or possibly all of them).
Anyway, if you change this it will show the Top Bar in the IB.
HTH.

Having a UINavigation in a UISplitView

So I was looking at this app http://itunes.apple.com/us/app/pageonce-personal-finance/id285056092?mt=8 (see iPad screenshots) and it appears that they have a uinavigation controller within the Details view of the UISplitView. When I tried to make a UINavigation controller in my Details View, the navigation bar overlaps with the UISplitView top bar. For example, on the pageonce app, my blue navigation bar would overlap with the top, silver bar.
Is that blue bar a navigation controller, or something else? If so, how did they move the navigation bar down while still having access to the top bar? Can we control the position of the navigation bar/view?
(source: apple.com)
.
It looks like they have a nested UINavigationController inside a UINavigationController on both the master and detail views. Each UINavigationController creates a bar. There is no such thing as a "UISplitView top bar". You only get a top bar if you put a UINavigationController inside the UISplitViewController in the first place. So all you need to do is to put another UINavigationController inside the UINavigationController and you will get another bar.

Webview in UINavigationBar

I want a small UIWebView on a navigation bar. Is it possible since NavigationBar takes only UINavigationItem ?
If you want the UIWebView actually showing on the UINavigationBar, you can set the UINavigationItem.titleView property to point to it.
If you want to show the UIWebView on the screen when a new navigation item is pushed on the navigation bar, then you should be using the navigation bar with an UINavigationController.