// // UIToolbarAdditions.h // p4scout // // Created by Work on 1/27/09. // Copyright 2009 Perforce Software, Inc. All rights reserved. // #import "UIToolbarAdditions.h" @implementation UIToolbar (UIToolbarAdditions) -(void)insertItem:(UIBarItem *)item inItemsAtIndex:(int)index animated:(BOOL)animated { NSMutableArray * items = [NSMutableArray arrayWithArray:[self items]]; [items insertObject:item atIndex:index]; [self setItems:items animated:animated]; } -(void)removeItemFromItemsAtIndex:(int)index animated:(BOOL)animated { NSMutableArray * items = [NSMutableArray arrayWithArray:[self items]]; [items removeObjectAtIndex:index]; [self setItems:items animated:animated]; } -(void)removeItem:(UIBarItem*)item fromItemsAnimated:(BOOL)animated; { int itemIndex = [[self items] indexOfObject:item ]; if ( itemIndex == NSNotFound ) return; [self removeItemFromItemsAtIndex:itemIndex animated:animated]; } @end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 8331 | Matt Attaway |
Adding initial version of MacMenu for Perforce MacMenu is a helpful Perforce client that sits in your toolbar. It allows you to run standard Perforce operations on the document that is open the currently active editor/viewer. |