How to create the “indexes” required for NSIndexPath:indexPathWithIndexes:length:

前端 未结 4 739
鱼传尺愫
鱼传尺愫 2020-12-23 16:45

The class method to create an index path with one or more nodes is:

+ (id)indexPathWithIndexes:(NSUInteger *)indexes length:(NSUInteger)length
4条回答
  •  感情败类
    2020-12-23 17:12

    You are correct. You might use it like this:

    NSUInteger indexArr[] = {1,2,3,4};
    
    NSIndexPath *indexPath = [NSIndexPath indexPathWithIndexes:indexArr length:4];
    

提交回复
热议问题