I am trying to retrieve my NSIndexSet
by calling -getIndexes:maxCount:indexRange
Here is my code
const NSUInteger arrayCount = picturesArray.count;
NSUInteger theIndexBuffer[arrayCount];
[picturesArray getIndexes:theIndexBuffer maxCount:arrayCount inIndexRange:nil];
However, in the debugger the IndexBuffer
is always showing as -1
. When I initialize it with a static number like NSUInteger theIndexBuffer[10]
, I get a proper instance.
This is probably because it doesnt know what arrayCount
is at compile time.
What is the correct way of doing this?