Iterating over an NSIndexSet
Since I needed this quite a lot and the original Apple documentation isn't very helpful here, I decided to post my 2 favorite ways of iterating over an
NSIndexSet:
This seems a little bit inefficient, but I was made belief (by
mmalc) that
indexGreaterThanIndex: behaves efficient when called this way.
Nevertheless if you want full speed at possibly large sets, then go for this one:
If you know a way to reverse the direction of this one please add a comment.
20:26 - Samstag, 8. Januar 2005