UI View doesn't seem to use translucent Navigation Bar - ios7

I'm updating an App to support iOS7. I have a Tab control with a number of tabs - several table views and one UI view. The strange thing is that IF the Navigation bar in the top is translucent, it has a different appearences depending on whether the tab control shows a table view or the UI view. The navigation bar seems to always be opaque when the UI view is selected.
Unchecking "Extend Edges - [ ] Under top bar" in the table views also make the navigation bar the same color for all views.
So the question boils down to that the navigation bar for the UI view doesn't seem to be translucent?

Set the navigationBar to be translucent in your viewDidLoad method:
self.navigationController.navigationBar.translucent = YES;

Related

How to match Navigation bar with status bar ios7

I am developing a UINavigationController based app where one of the view i am presenting is modal where i need a navigation bar which i have manually added but problem is the statusbar and navigation bar colors are different and both are translucent though, is there a way to set both same the way they appear on UINavigationController?
OK finally I think this is what i had to do ,
on presenting the view modally I am loosing the transluscent status bar instead get a transparent status bar,and also required to add my own navigation bar,thats how ios7 handles the status bar now, what i did is I wrapped the modally presented view into a navigation controller and then presented it , no changes i was required to do in segues just embedded the modal view controller in a navigation controller.
To embed a view in navigation controller in storyboard , just select the view go to Editor menu and select embed in-> navigation controller option.

How animate the title / buttons in the UINavigationBar

I have in the UINavigationBar status information about the health of the app. It change the title text color, and one of the buttons there.
The changes work fine, but I wish to provide a smooth animation (because the status update on data changes) but don't know how. I'm not asking about moving to another views, but about how animate only the UINavigationBar titles & buttons.
I don't think you can animate those things without some extra work.
A navigation bar is a complex beast, and by default the UI objects that appear on the screen are private and maintained by the navigation bar or the current navigation item.
There should be a way to make it work however.
The current navigation item has a property titleView. normally it's nil and the navigation bar displays a title string itself. But if you plug a UILabel into the titleView property then you should be able to do animations on the animatable properties of the titleLabel.
Likewise with the bar button items.

How to create a tall cutom navigation bar

I want to create a custom navigation bar like that
Here is a default translucent navigation bar. I want to add a new view with the same background color as in the navigation bar below the navigation bar. But i don't know what is the actual colour of the navigation bar. Or maybe there is other way to create a custom navigation bar.
Update
I need different presentations of a navigation bar for different view controllers inside one navigation controller. Also a navigation bar should have different functionality for different controllers, that is why I don't think that subclassing a UINavigationBar is a good idea.
I found the answer in this answer. I removed a bottom border from a navigation bar, placed a blur view below the navigation bar and added a bottom border to it.

Putting a toolbar directly under a navigation controller without hiding the content underneath the toolbar

I am trying to put a toolbar directly beneath a navigation bar but I need the toolbar to not hide the content from the view directly beneath it. My quick solution was to set the navigation controller's native toolbar to visible, which works and properly resizes the view beneath it so that it doesn't let anything hide behind it, BUT the default toolbar shows at the bottom of the screen.
I need it to be at the top, just under the nav bar. I figure the easy solution would be to change the frame of the default toolbar (which I don't know how to do) OR to position a new instance of the toolbar onto the view (which works but it hides the content beneath it) but have it resize the views below.
Please see the following image that I found to see what I'm trying to do. (note how the tableview's first row starts UNDER the tab bar)
Thanks!!!
You are confusing two things. The NavigationController toolbar property IS the bottom bar, any toolbar that you add to a view has nothing to do with the nav controller but is a property of that view.
If you have your own toolbar at the top of a view you need to move the rest of the view content down or set that toolbar to translucent if thats what your looking for.
Again the nav controller toolbar is always the bottom bar, the toolbar you drop in IB is just a toolbar for that view that you can put anywhere.
I don't believe you can change the frame of the default toolbar. You will need to create your own instance of a toolbar, position it at the bottom of the navigation bar and resize your tableView to fit below.
We can't see how you have your views set up but if you are starting with a view that is subclassed as UITableViewController you will have trouble doing that. What you want is to start with a UIViewController as your master controller, add a tableview and toolbar as subviews. Then position and size them as appropriate.
If you are hiding and showing the toolbar you will create a method to move it up under the navigation controller and again resize the tableview.

Question on Popover

In my app I have a navigation back button which occupies the top left of the navigation bar as such. Now I have a requirement to make the view in the navigation stack a split view. I'm doing my own custom split view controller. Now the question arises in the portrait mode of this split view. I want it to have the default popover behavior in portrait mode (like Apple's splitview in portrait). Can I manually set the location for the popover button on the navigation bar to some place other than top left without violating any UI guidelines? Since the back button is on top left corner by default already. I read over the UI guidelines but could not find anything concrete relating to this issue. Can the popover button be placed anywhere on the navigation bar for the portrait mode of my custom split view?
Thanks!
Yes, it can be done. As you said, there is no strict rule over placement of the pop-over in portrait mode.
This app uses custom split view and the placement of the button to display the navigator (inside a popover) in portrait mode varies on what view controller it is currently displaying. Whether it is the root of the navigation or if it is the view controller pushed over the navigation controller.