WPhoto icon indicating copy to clipboard operation
WPhoto copied to clipboard

在WPhotoViewController中didSelectItemAtIndexPath方法中对象移除两次

Open longxingtianxiaShuai opened this issue 7 years ago • 0 comments

for (NSInteger j = 0; j<_chooseCellArray.count; j++) {

                    //
                    NSIndexPath *ip = [NSIndexPath indexPathForRow:[_chooseCellArray[j] integerValue] inSection:0];
                    
                    if (indexPath.row == ip.row) {
                        [_chooseArray removeObjectAtIndex:j];
                    }
                }
                // 可以注释掉  同一个对象为什么通过下标移除一次 又直接移除一次
               // [_chooseArray removeObject:result];
                [_chooseCellArray removeObject:[NSString stringWithFormat:@"%ld",(long)indexPath.row]];

longxingtianxiaShuai avatar Dec 15 '17 10:12 longxingtianxiaShuai