views:

101

answers:

1

I've created a UIToolbar and added it as a subview of the navigationController. The problem is it doesn't disappear when I do push so I hide it on push but the makes it just disappear which makes it look tacky. I thought about animating it but I am finding it hard for the animation to be exactly like the push and pop animation for the navigation controller.

Does anyone know the push and pop animation properties so it can be exactly the same, or does anyone know what view or what property i can do to push and pop the toolbar with the navigation controller.

As a note I also tried to use the toolbar that comes with the navigationController but the buttons were disappearing after popping back to the view.

A: 

Yup, check out the hidesBottomBarWhenPushed property of the UIViewController that you are push/popping.

jbm
Doesn't do anything for me, it compiles but does nothing. Do I have to implement something in the UIViewController that I'm pushing?
Rudiger
Ah, I confused things by failing to note you added a UIToolbar as a separate subview, sorry. In this case the `hidesBottomBarWhenPushed` property isn't going to affect it. That property affects the built-in UIToolbar that is managed by the navigation controller. To use it, you would want to manipulate the `toolbarItems` property of your view controller. See this link:http://developer.apple.com/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/NavigationControllers/NavigationControllers.html#//apple_ref/doc/uid/TP40007457-CH103-SW4
jbm