草庐IT

indexPathWithIndexes

全部标签

objective-c - 如何创建 NSIndexPath :indexPathWithIndexes:length: 所需的 "indexes"

创建一个或多个节点的索引路径的类方法是:+(id)indexPathWithIndexes:(NSUInteger*)indexeslength:(NSUInteger)length我们如何创建第一个参数中所需的“索引”?文档将其列为组成索引路径的索引数组,但它需要一个(NSUinteger*)。创建1.2.3.4的索引路径,是不是简单的[1,2,3,4]数组? 最佳答案 你是对的。你可以这样使用它:NSUIntegerindexArr[]={1,2,3,4};NSIndexPath*indexPath=[NSIndexPathin