隐藏 UIToolBar
场景:隐藏UIToolBar下的UIBarButtonItem
隐藏UIToolBar上的UIBarButtonItem
隐藏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;