隐藏UIToolBar上的UIBarButtonItem

If you're trying to hide a UIBarButtonItem, you'll actually have to modify the contents of the parent bar. If it's a UIToolBar, you'll need to set the bar's items array to an array that doesn't include your item.

 

NSMutableArray     *items = [[myToolbar.items mutableCopy] autorelease];  [items removeObject: myButton];  myToolbar.items = items;  

你可能感兴趣的:(uibarbuttonitem)