McGrady
McGrady

Reputation: 41

How to hide the BarButtonItem on the ToolBar?

I have a UIView tha contain a ToolBar,and I add some BarButtonItem on the ToolBar. Now I want to hide the BarButtonItem in some time ,and display them in some time ,how can i accomplish it ??

Upvotes: 1

Views: 644

Answers (1)

tux91
tux91

Reputation: 1684

Change your toolbar.items accordingly.

For example if you had toolbar.items set to [NSArray arrayWithObjects: button1, button2, nil] and you need to hide button1, do toolbar = [NSArray arrayWithObject: button2]

Upvotes: 6

Related Questions