views:

46

answers:

2

Hello,

I would like to use UINavigationBar without decoration. I.e. I would like to create my own custom buttons and link those to the same actions (e.g. back) as the navigation items were linked to and have no bar presented at the top. I was told that one should use navigation bar even though graphically you should design the interaction yourself.

How do I go about doing this? I am quite new to navigation bar to start with...

If there is some tutorial you can direct me to it would be great (that is for using nav-bar without decoration).

Thanks in advance!

Regards, Niklas

A: 

You can use an UINavigationController to manage the stack of views, but hide the navigation bar and build your custom UI to replace it. Then call the corresponding push/pop methods to bring up the different views.

Plamen Dragozov
A: 

You can hide the navigation bar from a subview controller with

[self.navigationController setNavigationBarHidden:YES animated:NO];

Then just add your own buttons wherever you want on your subview controllers. To go back, just use

[self.navigationController popViewControllerAnimated:YES];

However, this approach does require that you have the buttons on each subview controller rather than just once in the navigation controller. You could instead add a subview in the navigation controller's view that obscures the navigation controller instead. There are other options as well, but they are probably not as useful.

Ed Marty