Commit 6a62ef081bf72ea5f13b2358eb97ced5f2859305

Authored by yanglingyu
1 parent 9cd2e47f

cell复用

CNLiveScioLive/Pages/Home/外宣要闻/View/CNLiveNewsLeftPicTableViewCell.m
@@ -82,11 +82,16 @@ @@ -82,11 +82,16 @@
82 [_picImage sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"placeholder"]]; 82 [_picImage sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"placeholder"]];
83 if (model.titleColor &&![model.titleColor isEqualToString:@""]) { 83 if (model.titleColor &&![model.titleColor isEqualToString:@""]) {
84 _titleLabel.textColor = [UIColor colorWithHexString:model.titleColor]; 84 _titleLabel.textColor = [UIColor colorWithHexString:model.titleColor];
  85 + }else{
  86 + _titleLabel.textColor = HEXCOLOR(0x333333);
85 } 87 }
86 if (model.tagsColor&&![model.tagsColor isEqualToString:@""]) { 88 if (model.tagsColor&&![model.tagsColor isEqualToString:@""]) {
87 89
88 _projectLabel.backgroundColor = [UIColor colorWithHexString:model.tagsColor]; 90 _projectLabel.backgroundColor = [UIColor colorWithHexString:model.tagsColor];
89 } 91 }
  92 + else{
  93 + _projectLabel.backgroundColor = Color_Blue;
  94 + }
90 //专题 95 //专题
91 if(model.tags && ![model.tags isEqualToString:@""]){ 96 if(model.tags && ![model.tags isEqualToString:@""]){
92 _projectLabel.text = model.tags; 97 _projectLabel.text = model.tags;
CNLiveScioLive/Pages/Home/外宣要闻/View/CNLiveNewsNoPicTableViewCell.m
@@ -65,11 +65,16 @@ @@ -65,11 +65,16 @@
65 _titleLabel.text = model.title; 65 _titleLabel.text = model.title;
66 if (model.titleColor &&![model.titleColor isEqualToString:@""]) { 66 if (model.titleColor &&![model.titleColor isEqualToString:@""]) {
67 _titleLabel.textColor = [UIColor colorWithHexString:model.titleColor]; 67 _titleLabel.textColor = [UIColor colorWithHexString:model.titleColor];
  68 + }else{
  69 + _titleLabel.textColor = HEXCOLOR(0x333333);
68 } 70 }
69 if (model.tagsColor&&![model.tagsColor isEqualToString:@""]) { 71 if (model.tagsColor&&![model.tagsColor isEqualToString:@""]) {
70 72
71 _projectLabel.backgroundColor = [UIColor colorWithHexString:model.tagsColor]; 73 _projectLabel.backgroundColor = [UIColor colorWithHexString:model.tagsColor];
72 } 74 }
  75 + else{
  76 + _projectLabel.backgroundColor = Color_Blue;
  77 + }
73 _timeLabel.text = [model.createDate componentsSeparatedByString:@" "][0]; 78 _timeLabel.text = [model.createDate componentsSeparatedByString:@" "][0];
74 79
75 if(model.tags && ![model.tags isEqualToString:@""]){ 80 if(model.tags && ![model.tags isEqualToString:@""]){
CNLiveScioLive/Pages/Home/外宣要闻/View/CNLiveNewsThreePicTableViewCell.m
@@ -96,11 +96,16 @@ @@ -96,11 +96,16 @@
96 } 96 }
97 if (model.titleColor &&![model.titleColor isEqualToString:@""]) { 97 if (model.titleColor &&![model.titleColor isEqualToString:@""]) {
98 _titleLabel.textColor = [UIColor colorWithHexString:model.titleColor]; 98 _titleLabel.textColor = [UIColor colorWithHexString:model.titleColor];
  99 + }else{
  100 + _titleLabel.textColor = HEXCOLOR(0x333333);
99 } 101 }
100 if (model.tagsColor&&![model.tagsColor isEqualToString:@""]) { 102 if (model.tagsColor&&![model.tagsColor isEqualToString:@""]) {
101 103
102 _projectLabel.backgroundColor = [UIColor colorWithHexString:model.tagsColor]; 104 _projectLabel.backgroundColor = [UIColor colorWithHexString:model.tagsColor];
103 } 105 }
  106 + else{
  107 + _projectLabel.backgroundColor = Color_Blue;
  108 + }
104 [_leftImage sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"placeholder"]]; 109 [_leftImage sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"placeholder"]];
105 [_picImage sd_setImageWithURL:[NSURL URLWithString:model.imgSmall] placeholderImage:[UIImage imageNamed:@"placeholder"]]; 110 [_picImage sd_setImageWithURL:[NSURL URLWithString:model.imgSmall] placeholderImage:[UIImage imageNamed:@"placeholder"]];
106 [_rightImage sd_setImageWithURL:[NSURL URLWithString:model.imgBig] placeholderImage:[UIImage imageNamed:@"placeholder"]]; 111 [_rightImage sd_setImageWithURL:[NSURL URLWithString:model.imgBig] placeholderImage:[UIImage imageNamed:@"placeholder"]];
CNLiveScioLive/Pages/Home/搜索/Controller/CNLiveSearchViewController.m
@@ -487,10 +487,15 @@ @@ -487,10 +487,15 @@
487 NSString *titleColor = _dic[@"titleColor"]; 487 NSString *titleColor = _dic[@"titleColor"];
488 if (titleColor&&![titleColor isEqualToString:@""]) { 488 if (titleColor&&![titleColor isEqualToString:@""]) {
489 cell.titleLabel.textColor = [UIColor colorWithHexString:_dic[@"titleColor"]]; 489 cell.titleLabel.textColor = [UIColor colorWithHexString:_dic[@"titleColor"]];
  490 + }else
  491 + {
  492 + cell.titleLabel.textColor = HEXCOLOR(0x333333);
490 } 493 }
491 NSString *tagsColor = _dic[@"tagsColor"]; 494 NSString *tagsColor = _dic[@"tagsColor"];
492 if (tagsColor&&![tagsColor isEqualToString:@""]) { 495 if (tagsColor&&![tagsColor isEqualToString:@""]) {
493 cell.tagsLabel.backgroundColor = [UIColor colorWithHexString:_dic[@"tagsColor"]]; 496 cell.tagsLabel.backgroundColor = [UIColor colorWithHexString:_dic[@"tagsColor"]];
  497 + }else{
  498 + cell.tagsLabel.backgroundColor = HEXCOLOR(0x195AC9);
494 } 499 }
495 cell.tagsLabel.text = text; 500 cell.tagsLabel.text = text;
496 [cell reSetTagFrame]; 501 [cell reSetTagFrame];
CNLiveScioLive/Pages/Home/新闻详情/OldController/SCIOSpecialViewController.m
@@ -442,10 +442,16 @@ @@ -442,10 +442,16 @@
442 NSString * titleColor = _dic[@"titleColor"]; 442 NSString * titleColor = _dic[@"titleColor"];
443 if (titleColor&&![titleColor isEqualToString:@""]) { 443 if (titleColor&&![titleColor isEqualToString:@""]) {
444 cell.titleLabel.textColor = [UIColor colorWithHexString:_dic[@"titleColor"]]; 444 cell.titleLabel.textColor = [UIColor colorWithHexString:_dic[@"titleColor"]];
  445 + }else
  446 + {
  447 + cell.titleLabel.textColor = HEXCOLOR(0x333333);
445 } 448 }
446 NSString *tagsColor = _dic[@"tagsColor"]; 449 NSString *tagsColor = _dic[@"tagsColor"];
447 if (tagsColor&&![tagsColor isEqualToString:@""]) { 450 if (tagsColor&&![tagsColor isEqualToString:@""]) {
448 cell.tagsLabel.backgroundColor = [UIColor colorWithHexString:_dic[@"tagsColor"]]; 451 cell.tagsLabel.backgroundColor = [UIColor colorWithHexString:_dic[@"tagsColor"]];
  452 + }else
  453 + {
  454 + cell.tagsLabel.backgroundColor = HEXCOLOR(0x195AC9);
449 } 455 }
450 NSString *text = [NSString stringWithFormat:@"%@",_dic[@"tags"]]; 456 NSString *text = [NSString stringWithFormat:@"%@",_dic[@"tags"]];
451 if ([text isEqualToString:@"<null>"]) { 457 if ([text isEqualToString:@"<null>"]) {