Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
longxingtianxiaShuai opened this issue Dec 15, 2017 · 0 comments

Comments

@longxingtianxiaShuai
Copy link

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]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant