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);
Written by Yan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#