Commit 0661acba5ebf4d99a9c23a8a320261bfe6511836

Authored by zhangxiaowen
1 parent b5116790

no message

CNLiveSettingModule/Classes/AboutUs/CNLiveAboutUsController.m
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
14 #import "CNLiveUserAgreementManager.h" 14 #import "CNLiveUserAgreementManager.h"
15 #import "CNLiveEnvironment.h" 15 #import "CNLiveEnvironment.h"
16 #import "CNLiveCategory.h" 16 #import "CNLiveCategory.h"
  17 +#import "CNLiveBaseKit.h"
17 18
18 #import "CNLiveSettingModel.h" 19 #import "CNLiveSettingModel.h"
19 #import "CNLiveSettingCell.h" 20 #import "CNLiveSettingCell.h"
@@ -72,7 +73,7 @@ static const NSInteger timeValue = 1.5; @@ -72,7 +73,7 @@ static const NSInteger timeValue = 1.5;
72 @"lineHeight":@"1" 73 @"lineHeight":@"1"
73 }, 74 },
74 @{ 75 @{
75 - @"style":@"2", 76 + @"style":@"4",
76 @"title":@"当前版本", 77 @"title":@"当前版本",
77 @"content":@"0.0.1", 78 @"content":@"0.0.1",
78 @"height":@"51", 79 @"height":@"51",
@@ -276,13 +277,13 @@ static const NSInteger timeValue = 1.5; @@ -276,13 +277,13 @@ static const NSInteger timeValue = 1.5;
276 _footerView.backgroundColor = [UIColor colorWithRed:242/255.0 green:242/255.0 blue:242/255.0 alpha:1.0]; 277 _footerView.backgroundColor = [UIColor colorWithRed:242/255.0 green:242/255.0 blue:242/255.0 alpha:1.0];
277 UILabel *title = [[UILabel alloc] initWithFrame:CGRectMake(0, 25, SCREEN_WIDTH, 25)]; 278 UILabel *title = [[UILabel alloc] initWithFrame:CGRectMake(0, 25, SCREEN_WIDTH, 25)];
278 title.textColor = [UIColor colorWithRed:40/255.0 green:40/255.0 blue:40/255.0 alpha:1.0]; 279 title.textColor = [UIColor colorWithRed:40/255.0 green:40/255.0 blue:40/255.0 alpha:1.0];
279 - title.font = [UIFont systemFontOfSize:12.0f]; 280 + title.font = UIFontCNMake(12.0);
280 title.text = @"版权信息"; 281 title.text = @"版权信息";
281 title.textAlignment = NSTextAlignmentCenter; 282 title.textAlignment = NSTextAlignmentCenter;
282 [_footerView addSubview:title]; 283 [_footerView addSubview:title];
283 UILabel *subTitle = [[UILabel alloc] initWithFrame:CGRectMake(0, 50, SCREEN_WIDTH, 25)]; 284 UILabel *subTitle = [[UILabel alloc] initWithFrame:CGRectMake(0, 50, SCREEN_WIDTH, 25)];
284 subTitle.textColor = [UIColor colorWithRed:40/255.0 green:40/255.0 blue:40/255.0 alpha:1.0]; 285 subTitle.textColor = [UIColor colorWithRed:40/255.0 green:40/255.0 blue:40/255.0 alpha:1.0];
285 - subTitle.font = [UIFont systemFontOfSize:12.0f]; 286 + subTitle.font = UIFontCNMake(12.0);
286 subTitle.text = @"北京中投视讯文化传媒股份有限公司版权所有"; 287 subTitle.text = @"北京中投视讯文化传媒股份有限公司版权所有";
287 subTitle.textAlignment = NSTextAlignmentCenter; 288 subTitle.textAlignment = NSTextAlignmentCenter;
288 [_footerView addSubview:subTitle]; 289 [_footerView addSubview:subTitle];
CNLiveSettingModule/Classes/Controller/CNLiveSettingController.m
@@ -57,7 +57,7 @@ static const NSInteger timeValue = 1.5; @@ -57,7 +57,7 @@ static const NSInteger timeValue = 1.5;
57 }, 57 },
58 @{ 58 @{
59 @"style":@"2", 59 @"style":@"2",
60 - @"title":@"帮助手册", 60 + @"title":@"帮助与反馈",
61 @"content":@"", 61 @"content":@"",
62 @"height":@"60", 62 @"height":@"60",
63 @"lineHeight":@"10" 63 @"lineHeight":@"10"
@@ -89,7 +89,7 @@ static const NSInteger timeValue = 1.5; @@ -89,7 +89,7 @@ static const NSInteger timeValue = 1.5;
89 }, 89 },
90 @{ 90 @{
91 @"style":@"3", 91 @"style":@"3",
92 - @"title":@"音量开关", 92 + @"title":@"金币音量开关",
93 @"height":@"51", 93 @"height":@"51",
94 @"lineHeight":@"1" 94 @"lineHeight":@"1"
95 }, 95 },
CNLiveSettingModule/Classes/Model/CNLiveSettingModel.h
@@ -13,6 +13,7 @@ typedef NS_ENUM(NSInteger, CNLiveSettingModelType) { @@ -13,6 +13,7 @@ typedef NS_ENUM(NSInteger, CNLiveSettingModelType) {
13 CNLiveSettingModelTypeDefault = 0, 13 CNLiveSettingModelTypeDefault = 0,
14 CNLiveSettingModelTypeText = 1, 14 CNLiveSettingModelTypeText = 1,
15 CNLiveSettingModelTypeSwitch = 2, 15 CNLiveSettingModelTypeSwitch = 2,
  16 + CNLiveSettingModelTypeTextFront = 3
16 }; 17 };
17 18
18 @interface CNLiveSettingModel : NSObject 19 @interface CNLiveSettingModel : NSObject
CNLiveSettingModule/Classes/Model/CNLiveSettingModel.m
@@ -15,13 +15,17 @@ @@ -15,13 +15,17 @@
15 return CNLiveSettingModelTypeDefault; 15 return CNLiveSettingModelTypeDefault;
16 } 16 }
17 else if([self.style isEqualToString:@"2"]){ 17 else if([self.style isEqualToString:@"2"]){
18 - return CNLiveSettingModelTypeText; 18 + return CNLiveSettingModelTypeTextFront;
19 19
20 } 20 }
21 else if([self.style isEqualToString:@"3"]){ 21 else if([self.style isEqualToString:@"3"]){
22 return CNLiveSettingModelTypeSwitch; 22 return CNLiveSettingModelTypeSwitch;
23 23
24 } 24 }
  25 + else if([self.style isEqualToString:@"4"]){
  26 + return CNLiveSettingModelTypeText;
  27 +
  28 + }
25 return CNLiveSettingModelTypeDefault; 29 return CNLiveSettingModelTypeDefault;
26 } 30 }
27 31
CNLiveSettingModule/Classes/View/CNLiveSettingCell.m
@@ -74,7 +74,7 @@ static const NSInteger margin = 12; @@ -74,7 +74,7 @@ static const NSInteger margin = 12;
74 }]; 74 }];
75 75
76 switch (self.model.type) { 76 switch (self.model.type) {
77 - case CNLiveSettingModelTypeText: 77 + case CNLiveSettingModelTypeTextFront:
78 { 78 {
79 _front.hidden = NO; 79 _front.hidden = NO;
80 _content.hidden = NO; 80 _content.hidden = NO;
@@ -88,6 +88,20 @@ static const NSInteger margin = 12; @@ -88,6 +88,20 @@ static const NSInteger margin = 12;
88 }]; 88 }];
89 } 89 }
90 break; 90 break;
  91 + case CNLiveSettingModelTypeText:
  92 + {
  93 + _front.hidden = YES;
  94 + _content.hidden = NO;
  95 + _switchOn.hidden = YES;
  96 + [_content mas_updateConstraints:^(MASConstraintMaker *make) {
  97 + make.top.equalTo(self.title.mas_top).with.offset(0);
  98 + make.left.equalTo(self.title.mas_right).with.offset(0);
  99 + make.right.equalTo(self.mas_right).with.offset(-margin);
  100 + make.height.equalTo(self.title.mas_height);
  101 +
  102 + }];
  103 + }
  104 + break;
91 case CNLiveSettingModelTypeSwitch: 105 case CNLiveSettingModelTypeSwitch:
92 { 106 {
93 _front.hidden = YES; 107 _front.hidden = YES;