Commit e49f9f8f29a48e685ed2f1b049e89eb137e226ac
1 parent
baab4431
国新调色修改
Showing
14 changed files
with
32 additions
and
91 deletions
CNLiveScioLive.xcodeproj/project.pbxproj
| ... | ... | @@ -13,7 +13,6 @@ |
| 13 | 13 | 080AB4C8217AD4F4008BA78F /* TemplateShareManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 080AB4C5217AD4F4008BA78F /* TemplateShareManager.m */; }; |
| 14 | 14 | 0816B5E42648C23A005E1F8C /* UIColor+CNGray.m in Sources */ = {isa = PBXBuildFile; fileRef = 0816B5E32648C23A005E1F8C /* UIColor+CNGray.m */; }; |
| 15 | 15 | 0816B5E92648C320005E1F8C /* WKWebView+CNGray.m in Sources */ = {isa = PBXBuildFile; fileRef = 0816B5E82648C320005E1F8C /* WKWebView+CNGray.m */; }; |
| 16 | - 0836125A264BA2BF00A18E52 /* UILabel+CNGray.m in Sources */ = {isa = PBXBuildFile; fileRef = 08361259264BA2BF00A18E52 /* UILabel+CNGray.m */; }; | |
| 17 | 16 | 083847E1215C5DDD00186618 /* VPImageCropperViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 083847E0215C5DDD00186618 /* VPImageCropperViewController.m */; }; |
| 18 | 17 | 083847E2215C5DDD00186618 /* VPImageCropperViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 083847E0215C5DDD00186618 /* VPImageCropperViewController.m */; }; |
| 19 | 18 | 083847E3215C5DDD00186618 /* VPImageCropperViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 083847E0215C5DDD00186618 /* VPImageCropperViewController.m */; }; |
| ... | ... | @@ -741,8 +740,6 @@ |
| 741 | 740 | 0816B5E32648C23A005E1F8C /* UIColor+CNGray.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIColor+CNGray.m"; sourceTree = "<group>"; }; |
| 742 | 741 | 0816B5E72648C320005E1F8C /* WKWebView+CNGray.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WKWebView+CNGray.h"; sourceTree = "<group>"; }; |
| 743 | 742 | 0816B5E82648C320005E1F8C /* WKWebView+CNGray.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "WKWebView+CNGray.m"; sourceTree = "<group>"; }; |
| 744 | - 08361258264BA2BF00A18E52 /* UILabel+CNGray.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UILabel+CNGray.h"; sourceTree = "<group>"; }; | |
| 745 | - 08361259264BA2BF00A18E52 /* UILabel+CNGray.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UILabel+CNGray.m"; sourceTree = "<group>"; }; | |
| 746 | 743 | 083847DF215C5DDD00186618 /* VPImageCropperViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VPImageCropperViewController.h; sourceTree = "<group>"; }; |
| 747 | 744 | 083847E0215C5DDD00186618 /* VPImageCropperViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VPImageCropperViewController.m; sourceTree = "<group>"; }; |
| 748 | 745 | 0838483C215C838B00186618 /* CNLiveENTabBarController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLiveENTabBarController.h; sourceTree = "<group>"; }; |
| ... | ... | @@ -2255,8 +2252,6 @@ |
| 2255 | 2252 | 0816B5E32648C23A005E1F8C /* UIColor+CNGray.m */, |
| 2256 | 2253 | 0816B5E72648C320005E1F8C /* WKWebView+CNGray.h */, |
| 2257 | 2254 | 0816B5E82648C320005E1F8C /* WKWebView+CNGray.m */, |
| 2258 | - 08361258264BA2BF00A18E52 /* UILabel+CNGray.h */, | |
| 2259 | - 08361259264BA2BF00A18E52 /* UILabel+CNGray.m */, | |
| 2260 | 2255 | ); |
| 2261 | 2256 | path = ImageGray; |
| 2262 | 2257 | sourceTree = "<group>"; |
| ... | ... | @@ -2845,7 +2840,6 @@ |
| 2845 | 2840 | isa = PBXSourcesBuildPhase; |
| 2846 | 2841 | buildActionMask = 2147483647; |
| 2847 | 2842 | files = ( |
| 2848 | - 0836125A264BA2BF00A18E52 /* UILabel+CNGray.m in Sources */, | |
| 2849 | 2843 | 08B5C5822153400700F5476E /* CNNewsoundBaseModel.m in Sources */, |
| 2850 | 2844 | 08585DB5215B4DA300FC2CA2 /* CNLiveAdvancedSearchViewController.m in Sources */, |
| 2851 | 2845 | 08C28A30263932960065B372 /* UIImageView+CNGrayImage.m in Sources */, | ... | ... |
CNLiveScioLive/Pages/Base/CNLiveBaseViewController.m
| ... | ... | @@ -60,7 +60,12 @@ |
| 60 | 60 | [headerButton setImage:[UIImage imageNamed:@"cnlive_icon"] forState:UIControlStateSelected]; |
| 61 | 61 | |
| 62 | 62 | [headerButton setTitle:_name forState:UIControlStateNormal]; |
| 63 | + if (HOMETITLECOLORSTR) { | |
| 64 | + [headerButton setTitleColor:[UIColor colorWithHexString:HOMETITLECOLORSTR] forState:UIControlStateNormal]; | |
| 65 | + }else{ | |
| 63 | 66 | [headerButton setTitleColor:Color_Blue forState:UIControlStateNormal]; |
| 67 | + } | |
| 68 | + | |
| 64 | 69 | headerButton.titleLabel.font = [UIFont systemFontOfSize:15]; |
| 65 | 70 | |
| 66 | 71 | headerButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;//居左显示 | ... | ... |
CNLiveScioLive/Pages/Header/PrefixHeader.pch
CNLiveScioLive/Pages/Home/CNHomeViewController.m
| ... | ... | @@ -94,17 +94,11 @@ |
| 94 | 94 | } |
| 95 | 95 | if(controllers.count > 0){ |
| 96 | 96 | self.segmentControl.titles = titles; |
| 97 | - if (HOMETITLECOLORSTR) { | |
| 98 | - self.segmentControl.titleNormalColor = segementColor_title_color; | |
| 99 | - self.segmentControl.titleSelectColor = [UIColor colorWithHexString:HOMETITLECOLORSTR]; | |
| 100 | - [self.segmentControl setBottomViewColor:[UIColor colorWithHexString:HOMETITLECOLORSTR]]; | |
| 101 | - }else{ | |
| 102 | 97 | if (ininavArray[0][@"textColor"]&&![ininavArray[0][@"textColor"] isEqualToString:@""]) { |
| 103 | 98 | |
| 104 | 99 | self.segmentControl.titleSelectColor = [UIColor colorWithHexString:ininavArray[0][@"textColor"]]; |
| 105 | 100 | [self.segmentControl setBottomViewColor:[UIColor colorWithHexString:ininavArray[0][@"textColor"]]]; |
| 106 | 101 | } |
| 107 | - } | |
| 108 | 102 | self.segmentControl.viewControllers = controllers; |
| 109 | 103 | } |
| 110 | 104 | NSDictionary *dic = @{@"titles":titles}; |
| ... | ... | @@ -149,7 +143,11 @@ |
| 149 | 143 | headerButton.layer.masksToBounds = true; |
| 150 | 144 | [headerButton setImage:[UIImage imageNamed:@"cnlive_icon"] forState:UIControlStateNormal]; |
| 151 | 145 | [headerButton setTitle:@"国新" forState:UIControlStateNormal]; |
| 146 | + if (HOMETITLECOLORSTR) { | |
| 147 | + [headerButton setTitleColor:[UIColor colorWithHexString:HOMETITLECOLORSTR] forState:UIControlStateNormal]; | |
| 148 | + }else{ | |
| 152 | 149 | [headerButton setTitleColor:Color_Blue forState:UIControlStateNormal]; |
| 150 | + } | |
| 153 | 151 | headerButton.titleLabel.font = [UIFont systemFontOfSize:15]; |
| 154 | 152 | |
| 155 | 153 | headerButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;//居左显示 | ... | ... |
CNLiveScioLive/Pages/Home/外宣要闻/View/CNLiveNewsLeftPicTableViewCell.m
| ... | ... | @@ -80,17 +80,13 @@ |
| 80 | 80 | _titleLabel.text = model.title; |
| 81 | 81 | _timeLabel.text = [model.createDate componentsSeparatedByString:@" "][0]; |
| 82 | 82 | [_picImage sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"placeholder"]]; |
| 83 | - if (model.titleColor) { | |
| 83 | + if (model.titleColor &&![model.titleColor isEqualToString:@""]) { | |
| 84 | 84 | _titleLabel.textColor = [UIColor colorWithHexString:model.titleColor]; |
| 85 | 85 | } |
| 86 | - if (HOMETITLECOLORSTR) { | |
| 87 | - _projectLabel.backgroundColor = [UIColor colorWithHexString:HOMETITLECOLORSTR]; | |
| 88 | - }else{ | |
| 89 | - if (model.tagsColor) { | |
| 86 | + if (model.tagsColor&&![model.tagsColor isEqualToString:@""]) { | |
| 90 | 87 | |
| 91 | 88 | _projectLabel.backgroundColor = [UIColor colorWithHexString:model.tagsColor]; |
| 92 | 89 | } |
| 93 | - } | |
| 94 | 90 | //专题 |
| 95 | 91 | if(model.tags && ![model.tags isEqualToString:@""]){ |
| 96 | 92 | _projectLabel.text = model.tags; | ... | ... |
CNLiveScioLive/Pages/Home/外宣要闻/View/CNLiveNewsNoPicTableViewCell.m
| ... | ... | @@ -63,17 +63,13 @@ |
| 63 | 63 | - (void)setModel:(CNHomeModel *)model{ |
| 64 | 64 | _model = model; |
| 65 | 65 | _titleLabel.text = model.title; |
| 66 | - if (model.titleColor) { | |
| 66 | + if (model.titleColor &&![model.titleColor isEqualToString:@""]) { | |
| 67 | 67 | _titleLabel.textColor = [UIColor colorWithHexString:model.titleColor]; |
| 68 | 68 | } |
| 69 | - | |
| 70 | - if (HOMETITLECOLORSTR) { | |
| 71 | - _projectLabel.backgroundColor = [UIColor colorWithHexString:HOMETITLECOLORSTR]; | |
| 72 | - }else{ | |
| 73 | - if (model.tagsColor) { | |
| 69 | + if (model.tagsColor&&![model.tagsColor isEqualToString:@""]) { | |
| 70 | + | |
| 74 | 71 | _projectLabel.backgroundColor = [UIColor colorWithHexString:model.tagsColor]; |
| 75 | 72 | } |
| 76 | - } | |
| 77 | 73 | _timeLabel.text = [model.createDate componentsSeparatedByString:@" "][0]; |
| 78 | 74 | |
| 79 | 75 | if(model.tags && ![model.tags isEqualToString:@""]){ | ... | ... |
CNLiveScioLive/Pages/Home/外宣要闻/View/CNLiveNewsThreePicTableViewCell.m
| ... | ... | @@ -94,16 +94,13 @@ |
| 94 | 94 | _projectLabel.text = model.subjecttag; |
| 95 | 95 | |
| 96 | 96 | } |
| 97 | - if (model.titleColor) { | |
| 97 | + if (model.titleColor &&![model.titleColor isEqualToString:@""]) { | |
| 98 | 98 | _titleLabel.textColor = [UIColor colorWithHexString:model.titleColor]; |
| 99 | 99 | } |
| 100 | - if (HOMETITLECOLORSTR) { | |
| 101 | - _projectLabel.backgroundColor = [UIColor colorWithHexString:HOMETITLECOLORSTR]; | |
| 102 | - }else{ | |
| 103 | - if (model.tagsColor) { | |
| 100 | + if (model.tagsColor&&![model.tagsColor isEqualToString:@""]) { | |
| 101 | + | |
| 104 | 102 | _projectLabel.backgroundColor = [UIColor colorWithHexString:model.tagsColor]; |
| 105 | 103 | } |
| 106 | - } | |
| 107 | 104 | [_leftImage sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"placeholder"]]; |
| 108 | 105 | [_picImage sd_setImageWithURL:[NSURL URLWithString:model.imgSmall] placeholderImage:[UIImage imageNamed:@"placeholder"]]; |
| 109 | 106 | [_rightImage sd_setImageWithURL:[NSURL URLWithString:model.imgBig] placeholderImage:[UIImage imageNamed:@"placeholder"]]; | ... | ... |
CNLiveScioLive/Pages/Home/搜索/Controller/CNLiveSearchViewController.m
| ... | ... | @@ -484,10 +484,12 @@ |
| 484 | 484 | if ([text isEqualToString:@"<null>"]) { |
| 485 | 485 | text = @""; |
| 486 | 486 | } |
| 487 | - if (_dic[@"titleColor"]) { | |
| 487 | + NSString *titleColor = _dic[@"titleColor"]; | |
| 488 | + if (titleColor&&![titleColor isEqualToString:@""]) { | |
| 488 | 489 | cell.titleLabel.textColor = [UIColor colorWithHexString:_dic[@"titleColor"]]; |
| 489 | 490 | } |
| 490 | - if (_dic[@"tagsColor"]) { | |
| 491 | + NSString *tagsColor = _dic[@"tagsColor"]; | |
| 492 | + if (tagsColor&&![tagsColor isEqualToString:@""]) { | |
| 491 | 493 | cell.tagsLabel.backgroundColor = [UIColor colorWithHexString:_dic[@"tagsColor"]]; |
| 492 | 494 | } |
| 493 | 495 | cell.tagsLabel.text = text; | ... | ... |
CNLiveScioLive/Pages/Home/新闻详情/OldController/OldVideoDetailViewController.m
| ... | ... | @@ -507,7 +507,8 @@ |
| 507 | 507 | [cell.backImage sd_setImageWithURL:[NSURL URLWithString:_dic[@"img"]] placeholderImage:[UIImage imageNamed:@"backDefault"]]; |
| 508 | 508 | cell.titleLabel.text = _dic[@"title"]; |
| 509 | 509 | cell.timeLabel.text = _dic[@"createDate"]; |
| 510 | - if (_dic[@"titleColor"]) { | |
| 510 | + NSString *titleColor = _dic[@"titleColor"]; | |
| 511 | + if (titleColor && ![titleColor isEqualToString:@""]) { | |
| 511 | 512 | cell.timeLabel.textColor = [UIColor colorWithHexString:_dic[@"titleColor"]]; |
| 512 | 513 | } |
| 513 | 514 | return cell; | ... | ... |
CNLiveScioLive/Pages/Home/新闻详情/OldController/SCIOSpecialViewController.m
| ... | ... | @@ -439,10 +439,12 @@ |
| 439 | 439 | |
| 440 | 440 | cell.titleLabel.text = _dic[@"title"]; |
| 441 | 441 | cell.timeLabel.text = _dic[@"createDate"]; |
| 442 | - if (_dic[@"titleColor"]) { | |
| 443 | - cell.tintColor = [UIColor colorWithHexString:_dic[@"titleColor"]]; | |
| 442 | + NSString * titleColor = _dic[@"titleColor"]; | |
| 443 | + if (titleColor&&![titleColor isEqualToString:@""]) { | |
| 444 | + cell.titleLabel.textColor = [UIColor colorWithHexString:_dic[@"titleColor"]]; | |
| 444 | 445 | } |
| 445 | - if (_dic[@"tagsColor"]) { | |
| 446 | + NSString *tagsColor = _dic[@"tagsColor"]; | |
| 447 | + if (tagsColor&&![tagsColor isEqualToString:@""]) { | |
| 446 | 448 | cell.tagsLabel.backgroundColor = [UIColor colorWithHexString:_dic[@"tagsColor"]]; |
| 447 | 449 | } |
| 448 | 450 | NSString *text = [NSString stringWithFormat:@"%@",_dic[@"tags"]]; | ... | ... |
CNLiveScioLive/Pages/Live/Controller/CNLiveViewController.m
| ... | ... | @@ -242,7 +242,11 @@ static NSString *indicatorTableViewCell = @"CNLiveIndicatorTableViewCell"; |
| 242 | 242 | headerButton.layer.masksToBounds = true; |
| 243 | 243 | [headerButton setImage:[UIImage imageNamed:@"cnlive_icon"] forState:UIControlStateNormal]; |
| 244 | 244 | [headerButton setTitle:@"直播" forState:UIControlStateNormal]; |
| 245 | + if (HOMETITLECOLORSTR) { | |
| 246 | + [headerButton setTitleColor:[UIColor colorWithHexString:HOMETITLECOLORSTR] forState:UIControlStateNormal]; | |
| 247 | + }else{ | |
| 245 | 248 | [headerButton setTitleColor:Color_Blue forState:UIControlStateNormal]; |
| 249 | + } | |
| 246 | 250 | headerButton.titleLabel.font = [UIFont systemFontOfSize:15]; |
| 247 | 251 | |
| 248 | 252 | headerButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;//居左显示 | ... | ... |
CNLiveScioLive/Pages/Live/View/CNLiveHeaderView.m
| ... | ... | @@ -44,8 +44,6 @@ |
| 44 | 44 | _stateLabel.textColor = [UIColor whiteColor]; |
| 45 | 45 | if ([[NSUserDefaults standardUserDefaults] boolForKey:ISGRAYMODE]) { |
| 46 | 46 | _stateLabel.backgroundColor = [UIColor grayColor]; |
| 47 | - }else if (HOMETITLECOLORSTR){ | |
| 48 | - _stateLabel.backgroundColor = [UIColor colorWithHexString:HOMETITLECOLORSTR]; | |
| 49 | 47 | }else{ |
| 50 | 48 | _stateLabel.backgroundColor = [UIColor redColor]; |
| 51 | 49 | } | ... | ... |
CNLiveScioLive/Pages/Tools/ImageGray/UILabel+CNGray.h deleted
100644 → 0
CNLiveScioLive/Pages/Tools/ImageGray/UILabel+CNGray.m deleted
100644 → 0
| 1 | -// | |
| 2 | -// UILabel+CNGray.m | |
| 3 | -// CNLiveScioLive | |
| 4 | -// | |
| 5 | -// Created by CNLive on 2021/5/12. | |
| 6 | -// Copyright © 2021 CNLive. All rights reserved. | |
| 7 | -// | |
| 8 | - | |
| 9 | -#import "UILabel+CNGray.h" | |
| 10 | -#import "UIColor+CNGray.h" | |
| 11 | -#import "ZXWKitConst.h" | |
| 12 | - | |
| 13 | -@implementation UILabel (CNGray) | |
| 14 | -+(void)load | |
| 15 | -{ | |
| 16 | - static dispatch_once_t onceToken; | |
| 17 | - dispatch_once(&onceToken, ^{ | |
| 18 | - Method setImage = class_getInstanceMethod(self,@selector(setTextColor:)); | |
| 19 | - Method xmtSwizzledSetImage = class_getInstanceMethod(self,@selector(cn_setTextColor:)); | |
| 20 | - ///交换IMP | |
| 21 | - method_exchangeImplementations(setImage, xmtSwizzledSetImage); | |
| 22 | - }); | |
| 23 | -} | |
| 24 | --(void)cn_setTextColor:(UIColor *)textColor{ | |
| 25 | - if (HOMETITLECOLORSTR) { | |
| 26 | - if (![textColor isEqual:[UIColor whiteColor]]&&![textColor isEqual:segementColor_title_color]) { | |
| 27 | - textColor = [UIColor colorWithHexString:HOMETITLECOLORSTR]; | |
| 28 | - | |
| 29 | - } | |
| 30 | - } | |
| 31 | - [self cn_setTextColor:textColor]; | |
| 32 | -} | |
| 33 | - | |
| 34 | -@end |