How to hiding toolbar?
I dragged an UItoolbar to the window in IB, I want it disap开发者_运维知识库pear when I click a button. This is the methond -
-(IBAction)hiding:(id)sender{
[self.navigationController setToolbarHidden:YES animated:NO]; }
but nothing happen...
can you help me fix it?
thx!
UINavigationController's setToolbarHidden:animated:
affects the UIToolbar that is built into the navigation controller. You've added a UIToolbar on your own, so that method won't affect it. To affect that one, you'll have to get a pointer to it somehow (e.g. attach it to an IBOutlet in IB) and then use its hidden
property.
精彩评论