Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a toolbar to a navigation controller

enter image description hereI am completely new to ios development and I am only interested in developing for ios5.

I have an app with some scenes, they are mostly tableviews. I also use a navigation controller

I however need to add some status text and buttons that are always visible in all scenes and thought that a toolbar added to the navigation controller should do the trick.

so i thought that i should only have to drag out a toolbar in storyboard to the navigation controller, but it does not stick there. I can add it to the bar underneath with first responder and navigation controller but that does not help me (small icons). I can also not add it to my table view (but if i drag out a plain view I can add it there)

do I have to make my own custom navigation class that the navigate view uses and then programatically add my toolbar?

like image 421
Rickard Liljeberg Avatar asked Sep 23 '26 04:09

Rickard Liljeberg


2 Answers

Had the same question recently. Check Attributes Inspector in your ViewController's properties in storyboard. There you can define a Bottom Bar.

Attributes Inspector

like image 121
nikans Avatar answered Sep 24 '26 21:09

nikans


Well, inside the UINavigationController, you should have something... A UIViewController for instance. You can easily add a UIToolBar by dragging the object inside the UIView of the UIViewController. What might being happening is that as the root view you have the UITableView, in that case I think you can't do that. But to better understand, just take a small print screen of your StoryBoard.

like image 42
Rui Peres Avatar answered Sep 24 '26 21:09

Rui Peres



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!