Created
September 27, 2008 19:34
-
-
Save Alos/13359 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Removes selected items | |
*/ | |
-(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, b)]; | |
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