I\'ve been developing an iPhone app that uses a UIToolbar (in the context of a UINavigationController) to display a small status icon at the bottom of the screen. The toolba
As you push new views onto your navigation controller the views in the toolbar will be replaced with the views from the toolbar of the view on the top of the stack.
Even if you have a static view (a view that does not change when you push a new controller), the view will still appear to be new because of the animation apple includes when you push a new view controller onto the stack.
Instead of using the navigation controller's toolbar, add one directly to the window and resize the navigation controller's view's frame to avoid it. That single global toolbar will then always be visible.
If you're using the Navigation-based Application template, and are using Interface Builder, the following steps should do it:
IBOutlet UIToolbar * toolbar; to the app delegate's instance variables.[window addSubview:[navigationController view]]; and add after it:CGRect frame = navigationController.view.frame;frame.size.height -= toolbar.frame.size.height;navigationController.view.frame = frame;toolbar in the -dealloc method.Since the toolbar is part of the window, not part of the navigation controller, the navigation controller shouldn't touch it.
I found this works for me:
CGFloat height = [self.toolbar frame].size.height;
CGRect rootBounds = self.window.rootViewController.view.bounds;
CGRect frame = CGRectMake(0, CGRectGetHeight(rootBounds) - height, CGRectGetWidth(rootBounds), height);
[self.toolbar setFrame:frame];
[self.navigationController.view addSubview:self.toolbar];