title: How to increment an NSIndexPath
body: <p>I have a data situation where I want to use an index path. As I'm traversing the data I want to increment the last node of an NSIndexPath. The code I have so far is:</p>
  
  <pre><code>int nbrIndex = [indexPath length];
  NSUInteger *indexArray = (NSUInteger *)calloc(sizeof(NSUInteger),nbrIndex);
  [indexPath getIndexes:indexArray];
  indexArray[nbrIndex - 1]++;
  [indexPath release];
  indexPath = [[NSIndexPath alloc] initWithIndexes:indexArray length:nbrIndex];
  free(indexArray);
  </code></pre>
  
  <p>This feels a bit, well, clunky - Is there a better way to do it? </p>