读书人

隐藏UIToolBar下的UIBarButtonItem

发布时间: 2012-09-16 17:33:16 作者: rapoo

隐藏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;?

读书人网 >移动开发

热点推荐