Last Updated: February 25, 2016
·
1.605K
· 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][gist].

Usage Example

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

[gist]: https://gist.github.com/rabovik/5894790

OSZAR »