美文网首页
用NSMutableDictionary记住多选

用NSMutableDictionary记住多选

作者: mjf | 来源:发表于2016-08-06 10:50 被阅读0次

@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记住多选

      本文链接:https://www.haomeiwen.com/subject/jxyksttx.html