0 notes &
UIToolBar Hide / Show UIBarButtonItem
BOOL active = YES;
NSMutableArray *items = [NSMutableArray arrayWithArray:toolBar.items];
BOOL found;
for(int i = 0; i < items.count; i++)
{
UIBarButtonItem *item = (UIBarButtonItem *)[items objectAtIndex:i];
if([item isEqual:myButton]) found = YES;
}
if(found && !active) [items removeObjectAtIndex:myButtonIndex];
if(!found && active) [items insertObject:textViewButton atIndex:myButtonIndex];
[toolBar setItems:items animated:YES];



