Commit b22497d6bdfaa004a53c8bd179c806e573e71260

Authored by zhangxiaowen
1 parent 789944fb

no message

CNLiveMineModule/Classes/Controller/CNLiveMineController.m
... ... @@ -128,9 +128,9 @@ static const NSInteger kHEIGHT = 250;
128 128 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
129 129 CNLiveMineCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNLiveMineCell];
130 130 cell.selectionStyle = UITableViewCellSelectionStyleNone;
  131 + cell.delegate = self;
131 132 CNLiveMineModel *model = self.data[indexPath.row];
132 133 cell.model = model;
133   - cell.delegate = self;
134 134 return cell;
135 135 }
136 136  
... ...
CNLiveMineModule/Classes/View/CNLiveMineCell.m
... ... @@ -34,9 +34,13 @@
34 34 [self.contentView addSubview:self.titleButton];
35 35 [self.contentView addSubview:self.allButton];
36 36 [self.contentView addSubview:self.line];
  37 +
37 38 }
38 39  
39 40 - (void)setModel:(CNLiveMineModel *)model{
  41 + if(_model == model){
  42 + return;
  43 + }
40 44 _model = model;
41 45 [_titleButton setTitle:model.name forState:UIControlStateNormal];
42 46 UIImage *xw_image = [self xw_getImageName:model.pic bundleName:@"CNLiveMineModule" targetClass:[CNLiveMineCell class]];
... ...