Skip to content

Instantly share code, notes, and snippets.

@asus4
Created January 24, 2014 07:04
Show Gist options
  • Save asus4/8593269 to your computer and use it in GitHub Desktop.
Save asus4/8593269 to your computer and use it in GitHub Desktop.
NSArrayController+Addition
#import <Cocoa/Cocoa.h>
@interface NSArrayController (Addition)
- (void) removeAllObjects;
@end
#import "NSArrayController+Additon.h"
@implementation NSArrayController (Additon)
- (void) removeAllObjects {
NSRange range = NSMakeRange(0, [self.arrangedObjects count]);
[self removeObjectsAtArrangedObjectIndexes:[NSIndexSet indexSetWithIndexesInRange:range]];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment