用NSMutableDictionary记住多选

@property (strong, nonatomic) NSMutableDictionary *selectDict;

[self.selectDict setObject:@(1)  forKey:[NSIndexPath indexPathForRow:0 inSection:0]];


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

{

model.isChecked = [[self.selectDict objectForKey:indexPath]intValue];

cell.model = model;

}

你可能感兴趣的:(用NSMutableDictionary记住多选)