Last Updated: February 25, 2016
·
1.529K
· rabovik

Easily creating NSIndexSet

There are no methods in NSIndexSet or NSMutableIndexSet for creating index sets with non-consecutive indexes.
Here are some macros for this: github gist.

Usage Example

NSIndexSet *indexSet = RSNSIndexSetMake(10,20,30,40,50);
NSMutableIndexSet *mutableIndexSet = RSNSMutableIndexSetMake(10,20,30);