用NSMutableDictionary记住多选

2016-08-06  本文已影响0人  mjf

@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;

}

上一篇 下一篇

猜你喜欢

热点阅读