开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜