The class method to create an index path with one or more nodes is:
+ (id)indexPathWithIndexes:(NSUInteger *)indexes length:(NSUInteger)length
How do we create the "indexes" required in the first parameter?
The documentation listed it as Array of indexes to make up the index path but it is expecting a (NSUinteger *).
To create an index path of 1.2.3.4, is it simply an array of [1,2,3,4] ?
You are correct. You might use it like this:
NSUInteger indexArr[] = {1,2,3,4}; NSIndexPath *indexPath = [NSIndexPath indexPathWithIndexes:indexArr length:4];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With