Skip to content

Instantly share code, notes, and snippets.

@Alos
Created September 28, 2008 04:53
Show Gist options
  • Save Alos/13410 to your computer and use it in GitHub Desktop.
Save Alos/13410 to your computer and use it in GitHub Desktop.
-(void)removeSelectedItems{
var indexes= [collectionView selectionIndexes];
var arr = [[CPArray alloc]init];
var a = [[collectionView selectionIndexes] firstIndex];
var b = [[collectionView selectionIndexes] lastIndex];
[indexes getIndexes: arr maxCount: a inIndexRange: CPMakeRange(0, 10)];
for(var i=0; i< [arr count];i++){
[model removeObjectAtIndex: [arr indexOfObject: i]];
[collectionView reloadContent];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment