Use NSValue’s +valueWithRange:
. To retrieve the range structure back, use the property rangeValue
.
[a addObject:[NSValue valueWithRange:r]];
...
NSRange r = a[4].rangeValue;
Use NSValue’s +valueWithRange:
. To retrieve the range structure back, use the property rangeValue
.
[a addObject:[NSValue valueWithRange:r]];
...
NSRange r = a[4].rangeValue;