创建一个或多个节点的索引路径的类方法是:
+ (id)indexPathWithIndexes:(NSUInteger *)indexes length:(NSUInteger)length
我们如何创建第一个参数中所需的“索引”?
文档将其列为组成索引路径的索引数组,但它需要一个 (NSUinteger *)。
创建1.2.3.4的索引路径,是不是简单的[1,2,3,4]数组?
最佳答案
你是对的。你可以这样使用它:
NSUInteger indexArr[] = {1,2,3,4};
NSIndexPath *indexPath = [NSIndexPath indexPathWithIndexes:indexArr length:4];
关于objective-c - 如何创建 NSIndexPath :indexPathWithIndexes:length: 所需的 "indexes",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/181432/