Since my last post I’m moving ahead. My Navigation Based Application has to contain toolbar at the bottom of UIViewController. I googled a couple of hours and found a lot of regarding stuff…. well at least I’ve found this page:
http://frog.io/blog/ios-toolbars
Implemented and got my toolbar buckled up. There’s only problem that no single bar button item is visible. So, I need two advices:
- How to make em visible?
- Is this approach correct enough? I mean wouldn’t it be rejected by Apple?
Adding a UIToolbar to a UINavigationController based application is actually deceptively easy. Per the UINavigationController Class Reference, there is a built-in UIToolbar, which is hidden by default.
To show the toolbar try this in your UIViewController subclass:
To add items to the toolbar, you simply use the
- (void)setToolbarItems:(NSArray *)toolbarItems animated:(BOOL)animatedduring- (void)viewDidLoador similar.You will need to remember to hide the toolbar during
- (void)viewDidDisappear:(BOOL)animatedunless you want it to hang around as other UIViewControllers are pushed and popped.