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