Commit c7311b07968be71e07d481c0a8f93f2695f958cd
1 parent
417ad66a
灰度,上色调节
Showing
13 changed files
with
103 additions
and
8 deletions
CNLiveScioLive.xcodeproj/project.pbxproj
| @@ -13,6 +13,7 @@ | @@ -13,6 +13,7 @@ | ||
| 13 | 080AB4C8217AD4F4008BA78F /* TemplateShareManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 080AB4C5217AD4F4008BA78F /* TemplateShareManager.m */; }; | 13 | 080AB4C8217AD4F4008BA78F /* TemplateShareManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 080AB4C5217AD4F4008BA78F /* TemplateShareManager.m */; }; |
| 14 | 0816B5E42648C23A005E1F8C /* UIColor+CNGray.m in Sources */ = {isa = PBXBuildFile; fileRef = 0816B5E32648C23A005E1F8C /* UIColor+CNGray.m */; }; | 14 | 0816B5E42648C23A005E1F8C /* UIColor+CNGray.m in Sources */ = {isa = PBXBuildFile; fileRef = 0816B5E32648C23A005E1F8C /* UIColor+CNGray.m */; }; |
| 15 | 0816B5E92648C320005E1F8C /* WKWebView+CNGray.m in Sources */ = {isa = PBXBuildFile; fileRef = 0816B5E82648C320005E1F8C /* WKWebView+CNGray.m */; }; | 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 */; }; | ||
| 16 | 083847E1215C5DDD00186618 /* VPImageCropperViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 083847E0215C5DDD00186618 /* VPImageCropperViewController.m */; }; | 17 | 083847E1215C5DDD00186618 /* VPImageCropperViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 083847E0215C5DDD00186618 /* VPImageCropperViewController.m */; }; |
| 17 | 083847E2215C5DDD00186618 /* VPImageCropperViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 083847E0215C5DDD00186618 /* VPImageCropperViewController.m */; }; | 18 | 083847E2215C5DDD00186618 /* VPImageCropperViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 083847E0215C5DDD00186618 /* VPImageCropperViewController.m */; }; |
| 18 | 083847E3215C5DDD00186618 /* VPImageCropperViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 083847E0215C5DDD00186618 /* VPImageCropperViewController.m */; }; | 19 | 083847E3215C5DDD00186618 /* VPImageCropperViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 083847E0215C5DDD00186618 /* VPImageCropperViewController.m */; }; |
| @@ -740,6 +741,8 @@ | @@ -740,6 +741,8 @@ | ||
| 740 | 0816B5E32648C23A005E1F8C /* UIColor+CNGray.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIColor+CNGray.m"; sourceTree = "<group>"; }; | 741 | 0816B5E32648C23A005E1F8C /* UIColor+CNGray.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIColor+CNGray.m"; sourceTree = "<group>"; }; |
| 741 | 0816B5E72648C320005E1F8C /* WKWebView+CNGray.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WKWebView+CNGray.h"; sourceTree = "<group>"; }; | 742 | 0816B5E72648C320005E1F8C /* WKWebView+CNGray.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WKWebView+CNGray.h"; sourceTree = "<group>"; }; |
| 742 | 0816B5E82648C320005E1F8C /* WKWebView+CNGray.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "WKWebView+CNGray.m"; sourceTree = "<group>"; }; | 743 | 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>"; }; | ||
| 743 | 083847DF215C5DDD00186618 /* VPImageCropperViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VPImageCropperViewController.h; sourceTree = "<group>"; }; | 746 | 083847DF215C5DDD00186618 /* VPImageCropperViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VPImageCropperViewController.h; sourceTree = "<group>"; }; |
| 744 | 083847E0215C5DDD00186618 /* VPImageCropperViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VPImageCropperViewController.m; sourceTree = "<group>"; }; | 747 | 083847E0215C5DDD00186618 /* VPImageCropperViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VPImageCropperViewController.m; sourceTree = "<group>"; }; |
| 745 | 0838483C215C838B00186618 /* CNLiveENTabBarController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLiveENTabBarController.h; sourceTree = "<group>"; }; | 748 | 0838483C215C838B00186618 /* CNLiveENTabBarController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLiveENTabBarController.h; sourceTree = "<group>"; }; |
| @@ -2252,6 +2255,8 @@ | @@ -2252,6 +2255,8 @@ | ||
| 2252 | 0816B5E32648C23A005E1F8C /* UIColor+CNGray.m */, | 2255 | 0816B5E32648C23A005E1F8C /* UIColor+CNGray.m */, |
| 2253 | 0816B5E72648C320005E1F8C /* WKWebView+CNGray.h */, | 2256 | 0816B5E72648C320005E1F8C /* WKWebView+CNGray.h */, |
| 2254 | 0816B5E82648C320005E1F8C /* WKWebView+CNGray.m */, | 2257 | 0816B5E82648C320005E1F8C /* WKWebView+CNGray.m */, |
| 2258 | + 08361258264BA2BF00A18E52 /* UILabel+CNGray.h */, | ||
| 2259 | + 08361259264BA2BF00A18E52 /* UILabel+CNGray.m */, | ||
| 2255 | ); | 2260 | ); |
| 2256 | path = ImageGray; | 2261 | path = ImageGray; |
| 2257 | sourceTree = "<group>"; | 2262 | sourceTree = "<group>"; |
| @@ -2840,6 +2845,7 @@ | @@ -2840,6 +2845,7 @@ | ||
| 2840 | isa = PBXSourcesBuildPhase; | 2845 | isa = PBXSourcesBuildPhase; |
| 2841 | buildActionMask = 2147483647; | 2846 | buildActionMask = 2147483647; |
| 2842 | files = ( | 2847 | files = ( |
| 2848 | + 0836125A264BA2BF00A18E52 /* UILabel+CNGray.m in Sources */, | ||
| 2843 | 08B5C5822153400700F5476E /* CNNewsoundBaseModel.m in Sources */, | 2849 | 08B5C5822153400700F5476E /* CNNewsoundBaseModel.m in Sources */, |
| 2844 | 08585DB5215B4DA300FC2CA2 /* CNLiveAdvancedSearchViewController.m in Sources */, | 2850 | 08585DB5215B4DA300FC2CA2 /* CNLiveAdvancedSearchViewController.m in Sources */, |
| 2845 | 08C28A30263932960065B372 /* UIImageView+CNGrayImage.m in Sources */, | 2851 | 08C28A30263932960065B372 /* UIImageView+CNGrayImage.m in Sources */, |
CNLiveScioLive/AppDelegate.m
| @@ -102,11 +102,18 @@ | @@ -102,11 +102,18 @@ | ||
| 102 | [XWHTTPTool GET:urlStr params:parameters success:^(id json) { | 102 | [XWHTTPTool GET:urlStr params:parameters success:^(id json) { |
| 103 | NSDictionary *dic = [NSDictionary dictionaryWithDictionary:json]; | 103 | NSDictionary *dic = [NSDictionary dictionaryWithDictionary:json]; |
| 104 | NSURL *url = [NSURL URLWithString:dic[@"data"][@"image"]]; | 104 | NSURL *url = [NSURL URLWithString:dic[@"data"][@"image"]]; |
| 105 | - if ([dic[@"data"][@"grayMode"] isEqualToString:@"true"]) { | 105 | + NSString * mode = dic[@"grayMode"]; |
| 106 | + if (mode.intValue == 1) { | ||
| 106 | [[NSUserDefaults standardUserDefaults] setBool:YES forKey:ISGRAYMODE]; | 107 | [[NSUserDefaults standardUserDefaults] setBool:YES forKey:ISGRAYMODE]; |
| 107 | }else{ | 108 | }else{ |
| 108 | [[NSUserDefaults standardUserDefaults] setBool:NO forKey:ISGRAYMODE]; | 109 | [[NSUserDefaults standardUserDefaults] setBool:NO forKey:ISGRAYMODE]; |
| 109 | } | 110 | } |
| 111 | + if (dic[@"homeTitleColor"]&&![dic[@"homeTitleColor"] isEqualToString:@""]) { | ||
| 112 | + [[NSUserDefaults standardUserDefaults] setValue:dic[@"homeTitleColor"] forKey:HOMETITLECOLOR]; | ||
| 113 | + }else | ||
| 114 | + { | ||
| 115 | + [[NSUserDefaults standardUserDefaults] setValue:nil forKey:HOMETITLECOLOR]; | ||
| 116 | + } | ||
| 110 | NSData *data = [[NSUserDefaults standardUserDefaults] objectForKey:@"lanchImage"]; | 117 | NSData *data = [[NSUserDefaults standardUserDefaults] objectForKey:@"lanchImage"]; |
| 111 | if (data.length<=0) { | 118 | if (data.length<=0) { |
| 112 | [self addRootViewController]; | 119 | [self addRootViewController]; |
CNLiveScioLive/Pages/Header/PrefixHeader.pch
| @@ -83,6 +83,7 @@ | @@ -83,6 +83,7 @@ | ||
| 83 | #import "UIImageView+CNGrayImage.h" | 83 | #import "UIImageView+CNGrayImage.h" |
| 84 | #import "UIColor+CNGray.h" | 84 | #import "UIColor+CNGray.h" |
| 85 | #import "WKWebView+CNGray.h" | 85 | #import "WKWebView+CNGray.h" |
| 86 | +#import "UILabel+CNGray.h" | ||
| 86 | //友盟统计 | 87 | //友盟统计 |
| 87 | #import <UMCommon/MobClick.h> | 88 | #import <UMCommon/MobClick.h> |
| 88 | #import <UMCommon/UMConfigure.h> | 89 | #import <UMCommon/UMConfigure.h> |
CNLiveScioLive/Pages/Header/SystemMacro.h
| @@ -99,7 +99,9 @@ NO) | @@ -99,7 +99,9 @@ NO) | ||
| 99 | #define ExitSuccessful @"ExitSuccessful" | 99 | #define ExitSuccessful @"ExitSuccessful" |
| 100 | #define GetCodeSuccessful @"GetCodeSuccessful" | 100 | #define GetCodeSuccessful @"GetCodeSuccessful" |
| 101 | #define ISGRAYMODE @"isGrayMode" | 101 | #define ISGRAYMODE @"isGrayMode" |
| 102 | +#define HOMETITLECOLOR @"homeTitleColor" | ||
| 102 | 103 | ||
| 104 | +#define HOMETITLECOLORSTR [[NSUserDefaults standardUserDefaults] valueForKey:HOMETITLECOLOR] | ||
| 103 | //图片 | 105 | //图片 |
| 104 | #define Image(image) [UIImage imageNamed:image] | 106 | #define Image(image) [UIImage imageNamed:image] |
| 105 | 107 |
CNLiveScioLive/Pages/Home/CNHomeViewController.m
| @@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
| 9 | #import "CNHomeViewController.h" | 9 | #import "CNHomeViewController.h" |
| 10 | #import "XLSlideMenu.h" | 10 | #import "XLSlideMenu.h" |
| 11 | #import "CNHomeModel.h" | 11 | #import "CNHomeModel.h" |
| 12 | +#import "ZXWKitConst.h" | ||
| 12 | 13 | ||
| 13 | #import "CNLiveHeraldedNewsViewController.h" | 14 | #import "CNLiveHeraldedNewsViewController.h" |
| 14 | #import "CNLiveReporterAskedViewController.h" | 15 | #import "CNLiveReporterAskedViewController.h" |
| @@ -93,9 +94,16 @@ | @@ -93,9 +94,16 @@ | ||
| 93 | } | 94 | } |
| 94 | if(controllers.count > 0){ | 95 | if(controllers.count > 0){ |
| 95 | self.segmentControl.titles = titles; | 96 | self.segmentControl.titles = titles; |
| 96 | - if (ininavArray[0][@"textColor"]) { | 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 | + if (ininavArray[0][@"textColor"]&&![ininavArray[0][@"textColor"] isEqualToString:@""]) { | ||
| 103 | + | ||
| 97 | self.segmentControl.titleSelectColor = [UIColor colorWithHexString:ininavArray[0][@"textColor"]]; | 104 | self.segmentControl.titleSelectColor = [UIColor colorWithHexString:ininavArray[0][@"textColor"]]; |
| 98 | - [self.segmentControl setBottomViewColor:[UIColor colorWithHexString:ininavArray[0][@"textColor"]]]; | 105 | + [self.segmentControl setBottomViewColor:[UIColor colorWithHexString:ininavArray[0][@"textColor"]]]; |
| 106 | + } | ||
| 99 | } | 107 | } |
| 100 | self.segmentControl.viewControllers = controllers; | 108 | self.segmentControl.viewControllers = controllers; |
| 101 | } | 109 | } |
CNLiveScioLive/Pages/Home/外宣要闻/View/CNLiveNewsLeftPicTableViewCell.m
| @@ -83,8 +83,13 @@ | @@ -83,8 +83,13 @@ | ||
| 83 | if (model.titleColor) { | 83 | if (model.titleColor) { |
| 84 | _titleLabel.textColor = [UIColor colorWithHexString:model.titleColor]; | 84 | _titleLabel.textColor = [UIColor colorWithHexString:model.titleColor]; |
| 85 | } | 85 | } |
| 86 | - if (model.tagsColor) { | 86 | + if (HOMETITLECOLORSTR) { |
| 87 | + _projectLabel.backgroundColor = [UIColor colorWithHexString:HOMETITLECOLORSTR]; | ||
| 88 | + }else{ | ||
| 89 | + if (model.tagsColor) { | ||
| 90 | + | ||
| 87 | _projectLabel.backgroundColor = [UIColor colorWithHexString:model.tagsColor]; | 91 | _projectLabel.backgroundColor = [UIColor colorWithHexString:model.tagsColor]; |
| 92 | + } | ||
| 88 | } | 93 | } |
| 89 | //专题 | 94 | //专题 |
| 90 | if(model.tags && ![model.tags isEqualToString:@""]){ | 95 | if(model.tags && ![model.tags isEqualToString:@""]){ |
CNLiveScioLive/Pages/Home/外宣要闻/View/CNLiveNewsNoPicTableViewCell.m
| @@ -66,8 +66,13 @@ | @@ -66,8 +66,13 @@ | ||
| 66 | if (model.titleColor) { | 66 | if (model.titleColor) { |
| 67 | _titleLabel.textColor = [UIColor colorWithHexString:model.titleColor]; | 67 | _titleLabel.textColor = [UIColor colorWithHexString:model.titleColor]; |
| 68 | } | 68 | } |
| 69 | - if (model.tagsColor) { | 69 | + |
| 70 | + if (HOMETITLECOLORSTR) { | ||
| 71 | + _projectLabel.backgroundColor = [UIColor colorWithHexString:HOMETITLECOLORSTR]; | ||
| 72 | + }else{ | ||
| 73 | + if (model.tagsColor) { | ||
| 70 | _projectLabel.backgroundColor = [UIColor colorWithHexString:model.tagsColor]; | 74 | _projectLabel.backgroundColor = [UIColor colorWithHexString:model.tagsColor]; |
| 75 | + } | ||
| 71 | } | 76 | } |
| 72 | _timeLabel.text = [model.createDate componentsSeparatedByString:@" "][0]; | 77 | _timeLabel.text = [model.createDate componentsSeparatedByString:@" "][0]; |
| 73 | 78 |
CNLiveScioLive/Pages/Home/外宣要闻/View/CNLiveNewsThreePicTableViewCell.m
| @@ -97,8 +97,12 @@ | @@ -97,8 +97,12 @@ | ||
| 97 | if (model.titleColor) { | 97 | if (model.titleColor) { |
| 98 | _titleLabel.textColor = [UIColor colorWithHexString:model.titleColor]; | 98 | _titleLabel.textColor = [UIColor colorWithHexString:model.titleColor]; |
| 99 | } | 99 | } |
| 100 | - if (model.tagsColor) { | 100 | + if (HOMETITLECOLORSTR) { |
| 101 | + _projectLabel.backgroundColor = [UIColor colorWithHexString:HOMETITLECOLORSTR]; | ||
| 102 | + }else{ | ||
| 103 | + if (model.tagsColor) { | ||
| 101 | _projectLabel.backgroundColor = [UIColor colorWithHexString:model.tagsColor]; | 104 | _projectLabel.backgroundColor = [UIColor colorWithHexString:model.tagsColor]; |
| 105 | + } | ||
| 102 | } | 106 | } |
| 103 | [_leftImage sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"placeholder"]]; | 107 | [_leftImage sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"placeholder"]]; |
| 104 | [_picImage sd_setImageWithURL:[NSURL URLWithString:model.imgSmall] placeholderImage:[UIImage imageNamed:@"placeholder"]]; | 108 | [_picImage sd_setImageWithURL:[NSURL URLWithString:model.imgSmall] placeholderImage:[UIImage imageNamed:@"placeholder"]]; |
CNLiveScioLive/Pages/Live/Controller/TopNoticeViewController.m
| @@ -60,7 +60,6 @@ | @@ -60,7 +60,6 @@ | ||
| 60 | [AlertViewTool showHUDViewText:CustomStr(@"NetworkiInterruption")]; | 60 | [AlertViewTool showHUDViewText:CustomStr(@"NetworkiInterruption")]; |
| 61 | return; | 61 | return; |
| 62 | } | 62 | } |
| 63 | - [AlertViewTool showHUDView]; | ||
| 64 | 63 | ||
| 65 | AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; | 64 | AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; |
| 66 | manager.responseSerializer = [AFHTTPResponseSerializer serializer]; | 65 | manager.responseSerializer = [AFHTTPResponseSerializer serializer]; |
CNLiveScioLive/Pages/Live/View/CNLiveHeaderView.m
| @@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import "CNLiveHeaderView.h" | 9 | #import "CNLiveHeaderView.h" |
| 10 | +#import "UIColor+CNGray.h" | ||
| 10 | #import "CNLiveModel.h" | 11 | #import "CNLiveModel.h" |
| 11 | 12 | ||
| 12 | @interface CNLiveHeaderView() | 13 | @interface CNLiveHeaderView() |
| @@ -41,7 +42,13 @@ | @@ -41,7 +42,13 @@ | ||
| 41 | _stateLabel.numberOfLines = 1; | 42 | _stateLabel.numberOfLines = 1; |
| 42 | _stateLabel.lineBreakMode = NSLineBreakByTruncatingTail; | 43 | _stateLabel.lineBreakMode = NSLineBreakByTruncatingTail; |
| 43 | _stateLabel.textColor = [UIColor whiteColor]; | 44 | _stateLabel.textColor = [UIColor whiteColor]; |
| 45 | + if ([[NSUserDefaults standardUserDefaults] boolForKey:ISGRAYMODE]) { | ||
| 46 | + _stateLabel.backgroundColor = [UIColor grayColor]; | ||
| 47 | + }else if (HOMETITLECOLORSTR){ | ||
| 48 | + _stateLabel.backgroundColor = [UIColor colorWithHexString:HOMETITLECOLORSTR]; | ||
| 49 | + }else{ | ||
| 44 | _stateLabel.backgroundColor = [UIColor redColor]; | 50 | _stateLabel.backgroundColor = [UIColor redColor]; |
| 51 | + } | ||
| 45 | _stateLabel.font = [UIFont systemFontOfSize:13]; | 52 | _stateLabel.font = [UIFont systemFontOfSize:13]; |
| 46 | _stateLabel.layer.masksToBounds = YES; | 53 | _stateLabel.layer.masksToBounds = YES; |
| 47 | _stateLabel.layer.cornerRadius = 2; | 54 | _stateLabel.layer.cornerRadius = 2; |
CNLiveScioLive/Pages/Tools/ImageGray/UILabel+CNGray.h
0 → 100644
CNLiveScioLive/Pages/Tools/ImageGray/UILabel+CNGray.m
0 → 100644
| 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 |
CNLiveScioLive/Pages/Tools/ZXWSegmentControl/ZXWKitConst.h
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | #define segementTitleNormalFont [UIFont systemFontOfSize:16] | 28 | #define segementTitleNormalFont [UIFont systemFontOfSize:16] |
| 29 | 29 | ||
| 30 | // 设置标题文本颜色(LBSegementView) | 30 | // 设置标题文本颜色(LBSegementView) |
| 31 | -#define segementColor_title_color [UIColor colorWithRed:180 / 255.0 green:149 / 255.0 blue:111 / 255.0 alpha:1.0] | 31 | +#define segementColor_title_color [UIColor colorWithRed:52 / 255.0 green:52 / 255.0 blue:52 / 255.0 alpha:1.0] |
| 32 | 32 | ||
| 33 | // 设置标题文本选中颜色(LBSegementView) | 33 | // 设置标题文本选中颜色(LBSegementView) |
| 34 | #define segementColor_title_select_color [UIColor colorWithRed:130 / 255.0 green:79 / 255.0 blue:15 / 255.0 alpha:1.0] | 34 | #define segementColor_title_select_color [UIColor colorWithRed:130 / 255.0 green:79 / 255.0 blue:15 / 255.0 alpha:1.0] |