Mason
Mason

Reputation: 7103

Making UIToolbar Disappear

This is a pretty straightforward question, so I don't think I need to post code. I have an app in which a toolbar appears when a specific view is pushed by the navigation controller. However, when I go back to the previous view, the toolbar remains on the view. I've tried calling [toolbar removeFromSuperview], as well as toggling UIToolbar's "hidden" property, within the view's viewDidUnload to no avail.

Any help would be greatly appreciated.

Upvotes: 0

Views: 410

Answers (1)

bshirley
bshirley

Reputation: 8357

-(void)[UINavigationController setToolbarHidden:(BOOL)hidden animated:(BOOL)animated]

Call that when appropriate. viewWillAppear: is a good choice. keep a flag as to what state you think it should be in

Upvotes: 1

Related Questions