Commit c2477bca187014224a8dd975ac3c04e2eaf8bc6a
1 parent
48859467
no message
Showing
21 changed files
with
126 additions
and
111 deletions
CNLiveBMineModule.podspec
CNLiveBMineModule/Assets/CNLiveBMineModule.xcassets/mine_bg_top.imageset/Contents.json
0 → 100644
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "universal", | |
| 5 | + "scale" : "1x" | |
| 6 | + }, | |
| 7 | + { | |
| 8 | + "filename" : "mine_bg_top@2x.png", | |
| 9 | + "idiom" : "universal", | |
| 10 | + "scale" : "2x" | |
| 11 | + }, | |
| 12 | + { | |
| 13 | + "filename" : "mine_bg_top@3x.png", | |
| 14 | + "idiom" : "universal", | |
| 15 | + "scale" : "3x" | |
| 16 | + } | |
| 17 | + ], | |
| 18 | + "info" : { | |
| 19 | + "author" : "xcode", | |
| 20 | + "version" : 1 | |
| 21 | + } | |
| 22 | +} | ... | ... |
CNLiveBMineModule/Assets/CNLiveBMineModule.xcassets/mine_bg_top.imageset/mine_bg_top@2x.png
0 → 100644
3.31 KB
CNLiveBMineModule/Assets/CNLiveBMineModule.xcassets/mine_bg_top.imageset/mine_bg_top@3x.png
0 → 100644
7.32 KB
CNLiveBMineModule/Assets/CNLiveBMineModule.xcassets/mine_location.imageset/Contents.json
| ... | ... | @@ -5,18 +5,18 @@ |
| 5 | 5 | "scale" : "1x" |
| 6 | 6 | }, |
| 7 | 7 | { |
| 8 | - "idiom" : "universal", | |
| 9 | 8 | "filename" : "mine_location@2x.png", |
| 9 | + "idiom" : "universal", | |
| 10 | 10 | "scale" : "2x" |
| 11 | 11 | }, |
| 12 | 12 | { |
| 13 | - "idiom" : "universal", | |
| 14 | 13 | "filename" : "mine_location@3x.png", |
| 14 | + "idiom" : "universal", | |
| 15 | 15 | "scale" : "3x" |
| 16 | 16 | } |
| 17 | 17 | ], |
| 18 | 18 | "info" : { |
| 19 | - "version" : 1, | |
| 20 | - "author" : "xcode" | |
| 19 | + "author" : "xcode", | |
| 20 | + "version" : 1 | |
| 21 | 21 | } |
| 22 | -} | |
| 23 | 22 | \ No newline at end of file |
| 23 | +} | ... | ... |
CNLiveBMineModule/Assets/CNLiveBMineModule.xcassets/mine_location.imageset/mine_location@2x.png
CNLiveBMineModule/Assets/CNLiveBMineModule.xcassets/mine_location.imageset/mine_location@3x.png
CNLiveBMineModule/Classes/Controller/CNLiveBMineController.m
| ... | ... | @@ -95,6 +95,16 @@ static const CGFloat timeValue = 1.5; |
| 95 | 95 | self.headerView = headerView; |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | +#pragma mark - UIScrollViewDelegate | |
| 99 | +- (void)scrollViewDidScroll:(UIScrollView *)scrollView { | |
| 100 | + CGPoint point = scrollView.contentOffset; | |
| 101 | + if (point.y < -kHEIGHT) { | |
| 102 | + CGRect rect = [self.tableView viewWithTag:666].frame; | |
| 103 | + rect.origin.y = point.y; | |
| 104 | + rect.size.height = -point.y; | |
| 105 | + [self.tableView viewWithTag:666].frame = rect; | |
| 106 | + } | |
| 107 | +} | |
| 98 | 108 | #pragma mark - UITableViewDelegate |
| 99 | 109 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ |
| 100 | 110 | return 45; |
| ... | ... | @@ -127,7 +137,7 @@ static const CGFloat timeValue = 1.5; |
| 127 | 137 | [self.navigationController pushViewController:vc animated:YES]; |
| 128 | 138 | } |
| 129 | 139 | break; |
| 130 | - case CNLiveBMineHeaderViewTypeWintess: | |
| 140 | + case CNLiveBMineHeaderViewTypeHome: | |
| 131 | 141 | { |
| 132 | 142 | |
| 133 | 143 | } | ... | ... |
CNLiveBMineModule/Classes/Setting/AboutUs/CNLiveAboutUsController.m
| ... | ... | @@ -206,7 +206,7 @@ static const NSInteger timeValue = 1.5; |
| 206 | 206 | |
| 207 | 207 | NSMutableDictionary *titleAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 208 | 208 | |
| 209 | - titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | |
| 209 | + titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 210 | 210 | |
| 211 | 211 | NSMutableDictionary *cancelAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 212 | 212 | cancelAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; | ... | ... |
CNLiveBMineModule/Classes/Setting/Cancellation/CNLiveCancellationController.m
| ... | ... | @@ -59,9 +59,7 @@ static const NSInteger timeValue = 1.5; |
| 59 | 59 | [self setData]; |
| 60 | 60 | |
| 61 | 61 | } |
| 62 | -- (void)dealloc{ | |
| 63 | 62 | |
| 64 | -} | |
| 65 | 63 | #pragma mark - UI |
| 66 | 64 | - (void)createUI { |
| 67 | 65 | [self.view addSubview:self.navigationBar]; |
| ... | ... | @@ -158,7 +156,7 @@ static const NSInteger timeValue = 1.5; |
| 158 | 156 | |
| 159 | 157 | NSMutableDictionary *titleAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 160 | 158 | |
| 161 | - titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | |
| 159 | + titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 162 | 160 | |
| 163 | 161 | NSMutableDictionary *cancelAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 164 | 162 | cancelAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; |
| ... | ... | @@ -221,7 +219,7 @@ static const NSInteger timeValue = 1.5; |
| 221 | 219 | |
| 222 | 220 | NSMutableDictionary *titleAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 223 | 221 | |
| 224 | - titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | |
| 222 | + titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 225 | 223 | |
| 226 | 224 | NSMutableDictionary *cancelAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 227 | 225 | cancelAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; | ... | ... |
CNLiveBMineModule/Classes/Setting/Cancellation/CNLiveCancellationView.m
| ... | ... | @@ -77,10 +77,10 @@ static const NSInteger margin = 15; |
| 77 | 77 | - (void)clickedAgreeButton:(UIButton *)btn{ |
| 78 | 78 | btn.selected = !btn.selected; |
| 79 | 79 | if(btn.selected){ |
| 80 | - _cancellationBtn.backgroundColor = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | |
| 80 | + _cancellationBtn.backgroundColor = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 81 | 81 | |
| 82 | 82 | }else{ |
| 83 | - _cancellationBtn.backgroundColor = [UIColor colorWithRed:146/255.0 green:227/255.0 blue:154/255.0 alpha:1.0]; | |
| 83 | + _cancellationBtn.backgroundColor = [UIColor colorWithRed:187/255.0 green:223/255.0 blue:254/255.0 alpha:1.0]; | |
| 84 | 84 | } |
| 85 | 85 | } |
| 86 | 86 | - (void)cancellationDidClicked:(UIButton *)btn{ |
| ... | ... | @@ -145,7 +145,7 @@ static const NSInteger margin = 15; |
| 145 | 145 | if (!_cancellationBtn) { |
| 146 | 146 | _cancellationBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| 147 | 147 | [_cancellationBtn setTitle:@"确认注销" forState:UIControlStateNormal]; |
| 148 | - _cancellationBtn.backgroundColor = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 148 | + _cancellationBtn.backgroundColor = [UIColor colorWithRed:187/255.0 green:223/255.0 blue:254/255.0 alpha:1.0]; | |
| 149 | 149 | _cancellationBtn.titleLabel.font = [UIFont fontWithName:@"PingFangSC-Regular" size:17]; |
| 150 | 150 | _cancellationBtn.layer.cornerRadius = 20; |
| 151 | 151 | _cancellationBtn.layer.masksToBounds = YES; | ... | ... |
CNLiveBMineModule/Classes/Setting/Controller/CNLiveSettingController.m
| ... | ... | @@ -39,41 +39,41 @@ static const NSInteger timeValue = 1.5; |
| 39 | 39 | - (void)loadData { |
| 40 | 40 | NSArray *data = @[ |
| 41 | 41 | @{ |
| 42 | - @"style":@"2", | |
| 42 | + @"style":@"1", | |
| 43 | 43 | @"title":@"更换手机号", |
| 44 | 44 | @"content":CNUserShareModel.mobile, |
| 45 | 45 | @"height":@"60", |
| 46 | 46 | @"lineHeight":@"10" |
| 47 | 47 | }, |
| 48 | 48 | @{ |
| 49 | - @"style":@"2", | |
| 49 | + @"style":@"0", | |
| 50 | 50 | @"title":@"绑定管理", |
| 51 | 51 | @"content":@"", |
| 52 | 52 | @"height":@"60", |
| 53 | 53 | @"lineHeight":@"10" |
| 54 | 54 | }, |
| 55 | 55 | @{ |
| 56 | - @"style":@"2", | |
| 56 | + @"style":@"0", | |
| 57 | 57 | @"title":@"帮助与反馈", |
| 58 | 58 | @"content":@"", |
| 59 | 59 | @"height":@"60", |
| 60 | 60 | @"lineHeight":@"10" |
| 61 | 61 | }, |
| 62 | 62 | @{ |
| 63 | - @"style":@"2", | |
| 63 | + @"style":@"1", | |
| 64 | 64 | @"title":@"清除缓存", |
| 65 | 65 | @"content":@"30k", |
| 66 | 66 | @"height":@"51", |
| 67 | 67 | @"lineHeight":@"1" |
| 68 | 68 | }, |
| 69 | 69 | @{ |
| 70 | - @"style":@"1", | |
| 70 | + @"style":@"0", | |
| 71 | 71 | @"title":@"关于我们", |
| 72 | 72 | @"height":@"51", |
| 73 | 73 | @"lineHeight":@"1" |
| 74 | 74 | }, |
| 75 | 75 | @{ |
| 76 | - @"style":@"1", | |
| 76 | + @"style":@"0", | |
| 77 | 77 | @"title":@"注销账号", |
| 78 | 78 | @"height":@"51", |
| 79 | 79 | @"lineHeight":@"1" |
| ... | ... | @@ -194,7 +194,7 @@ static const NSInteger timeValue = 1.5; |
| 194 | 194 | |
| 195 | 195 | NSMutableDictionary *titleAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 196 | 196 | |
| 197 | - titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | |
| 197 | + titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 198 | 198 | |
| 199 | 199 | NSMutableDictionary *cancelAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 200 | 200 | cancelAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; |
| ... | ... | @@ -290,7 +290,7 @@ static const NSInteger timeValue = 1.5; |
| 290 | 290 | |
| 291 | 291 | NSMutableDictionary *titleAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 292 | 292 | |
| 293 | - titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | |
| 293 | + titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 294 | 294 | |
| 295 | 295 | NSMutableDictionary *cancelAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 296 | 296 | cancelAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; | ... | ... |
CNLiveBMineModule/Classes/Setting/Model/CNLiveSettingModel.h
| ... | ... | @@ -11,8 +11,7 @@ |
| 11 | 11 | NS_ASSUME_NONNULL_BEGIN |
| 12 | 12 | typedef NS_ENUM(NSInteger, CNLiveSettingModelType) { |
| 13 | 13 | CNLiveSettingModelTypeDefault = 0, |
| 14 | - CNLiveSettingModelTypeText = 1, | |
| 15 | - CNLiveSettingModelTypeTextFront = 2 | |
| 14 | + CNLiveSettingModelTypeText = 1 | |
| 16 | 15 | }; |
| 17 | 16 | |
| 18 | 17 | @interface CNLiveSettingModel : NSObject | ... | ... |
CNLiveBMineModule/Classes/Setting/Model/CNLiveSettingModel.m
| ... | ... | @@ -11,16 +11,11 @@ |
| 11 | 11 | @implementation CNLiveSettingModel |
| 12 | 12 | |
| 13 | 13 | - (CNLiveSettingModelType)type{ |
| 14 | - if([self.style isEqualToString:@"1"]){ | |
| 14 | + if([self.style isEqualToString:@"0"]){ | |
| 15 | 15 | return CNLiveSettingModelTypeDefault; |
| 16 | 16 | } |
| 17 | - else if([self.style isEqualToString:@"2"]){ | |
| 18 | - return CNLiveSettingModelTypeTextFront; | |
| 19 | - | |
| 20 | - } | |
| 21 | - else if([self.style isEqualToString:@"4"]){ | |
| 17 | + else if([self.style isEqualToString:@"1"]){ | |
| 22 | 18 | return CNLiveSettingModelTypeText; |
| 23 | - | |
| 24 | 19 | } |
| 25 | 20 | return CNLiveSettingModelTypeDefault; |
| 26 | 21 | } | ... | ... |
CNLiveBMineModule/Classes/Setting/UpdateTel/CNLiveUpdateTelController.m
| ... | ... | @@ -63,7 +63,7 @@ static const NSInteger timeValue = 1.5; |
| 63 | 63 | |
| 64 | 64 | NSMutableDictionary *titleAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 65 | 65 | |
| 66 | - titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | |
| 66 | + titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 67 | 67 | |
| 68 | 68 | NSMutableDictionary *cancelAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 69 | 69 | cancelAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; |
| ... | ... | @@ -179,7 +179,7 @@ static const NSInteger timeValue = 1.5; |
| 179 | 179 | |
| 180 | 180 | NSMutableDictionary *titleAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 181 | 181 | |
| 182 | - titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | |
| 182 | + titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 183 | 183 | |
| 184 | 184 | NSMutableDictionary *cancelAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 185 | 185 | cancelAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; | ... | ... |
CNLiveBMineModule/Classes/Setting/UpdateTel/CNLiveUpdateTelView.m
| ... | ... | @@ -108,12 +108,10 @@ static const NSInteger timeValue = 1.5; |
| 108 | 108 | [self.telTF mas_makeConstraints:^(MASConstraintMaker *make) { |
| 109 | 109 | make.centerY.equalTo(self.numberLabel); |
| 110 | 110 | make.left.equalTo(self.numberLabel.mas_right).offset(20); |
| 111 | -// make.right.equalTo(self.verification.mas_left).offset(-10); | |
| 112 | 111 | }]; |
| 113 | 112 | [self.codeLabel mas_makeConstraints:^(MASConstraintMaker *make) { |
| 114 | 113 | make.top.equalTo(self.numberLabel.mas_bottom).offset(0); |
| 115 | 114 | make.left.equalTo(self.numberLabel); |
| 116 | -// make.width.mas_equalTo(50); | |
| 117 | 115 | make.height.mas_equalTo(50); |
| 118 | 116 | |
| 119 | 117 | }]; |
| ... | ... | @@ -305,7 +303,7 @@ static const NSInteger timeValue = 1.5; |
| 305 | 303 | [_binding setTitle:@"验证后绑定新手机号" forState:UIControlStateNormal]; |
| 306 | 304 | [_binding setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; |
| 307 | 305 | _binding.titleLabel.font = UIFontCNMake(15.0); |
| 308 | - _binding.backgroundColor = [UIColor colorWithRed:0/255.0 green:194/255.0 blue:0/255.0 alpha:1.0]; | |
| 306 | + _binding.backgroundColor = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 309 | 307 | _binding.layer.cornerRadius = 45/2.0; |
| 310 | 308 | _binding.layer.masksToBounds = YES; |
| 311 | 309 | [_binding addTarget:self action:@selector(bindingDidClicked:) forControlEvents:UIControlEventTouchUpInside]; |
| ... | ... | @@ -331,7 +329,7 @@ static const NSInteger timeValue = 1.5; |
| 331 | 329 | [alertController addAction:sure]; |
| 332 | 330 | |
| 333 | 331 | NSMutableDictionary *titleAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 334 | - titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | |
| 332 | + titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 335 | 333 | sure.buttonAttributes = titleAttributs; |
| 336 | 334 | |
| 337 | 335 | [alertController showWithAnimated:YES]; |
| ... | ... | @@ -366,7 +364,7 @@ static const NSInteger timeValue = 1.5; |
| 366 | 364 | |
| 367 | 365 | self.gotVerificationCode = NO; |
| 368 | 366 | self.verification.userInteractionEnabled = YES; |
| 369 | - self.verification.backgroundColor = [UIColor colorWithRed:0/255.0 green:194/255.0 blue:0/255.0 alpha:1.0]; | |
| 367 | + self.verification.backgroundColor = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 370 | 368 | [self.verification setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; |
| 371 | 369 | self.gotVerificationCodeIng = NO; |
| 372 | 370 | |
| ... | ... | @@ -401,7 +399,7 @@ static const NSInteger timeValue = 1.5; |
| 401 | 399 | [alertController addAction:sure]; |
| 402 | 400 | |
| 403 | 401 | NSMutableDictionary *titleAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 404 | - titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | |
| 402 | + titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 405 | 403 | sure.buttonAttributes = titleAttributs; |
| 406 | 404 | |
| 407 | 405 | [alertController showWithAnimated:YES]; |
| ... | ... | @@ -421,7 +419,7 @@ static const NSInteger timeValue = 1.5; |
| 421 | 419 | [alertController addAction:sure]; |
| 422 | 420 | |
| 423 | 421 | NSMutableDictionary *titleAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 424 | - titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | |
| 422 | + titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 425 | 423 | sure.buttonAttributes = titleAttributs; |
| 426 | 424 | |
| 427 | 425 | [alertController showWithAnimated:YES]; |
| ... | ... | @@ -465,7 +463,7 @@ static const NSInteger timeValue = 1.5; |
| 465 | 463 | - (void)setupTextFieldUI:(UITextField *)textField{ |
| 466 | 464 | if (textField.text.length > 0) { |
| 467 | 465 | _verification.userInteractionEnabled = YES; |
| 468 | - _verification.backgroundColor = [UIColor colorWithRed:0/255.0 green:194/255.0 blue:0/255.0 alpha:1.0]; | |
| 466 | + _verification.backgroundColor = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 469 | 467 | [_verification setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; |
| 470 | 468 | } |
| 471 | 469 | else { | ... | ... |
CNLiveBMineModule/Classes/Setting/View/CNLiveSettingCell.m
| ... | ... | @@ -28,26 +28,25 @@ static const NSInteger margin = 12; |
| 28 | 28 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; |
| 29 | 29 | if (self) { |
| 30 | 30 | self.contentView.backgroundColor = [UIColor whiteColor]; |
| 31 | - | |
| 32 | 31 | [self.contentView addSubview:self.line]; |
| 33 | 32 | [self.contentView addSubview:self.title]; |
| 34 | 33 | [self.contentView addSubview:self.content]; |
| 35 | 34 | [self.contentView addSubview:self.front]; |
| 36 | - | |
| 35 | + | |
| 37 | 36 | } |
| 38 | 37 | return self; |
| 39 | 38 | } |
| 39 | + | |
| 40 | 40 | - (void)setModel:(CNLiveSettingModel *)model{ |
| 41 | 41 | _model = model; |
| 42 | 42 | _title.text = model.title; |
| 43 | 43 | _content.text = model.content; |
| 44 | + _content.hidden = _model.type == CNLiveSettingModelTypeDefault; | |
| 44 | 45 | [self xw_layoutSubviews]; |
| 46 | + | |
| 45 | 47 | } |
| 46 | 48 | |
| 47 | 49 | - (void)xw_layoutSubviews{ |
| 48 | - _title.font = UIFontCNMake(16.0); | |
| 49 | - _content.font = UIFontCNMake(14.0); | |
| 50 | - | |
| 51 | 50 | [_line mas_updateConstraints:^(MASConstraintMaker *make) { |
| 52 | 51 | make.left.equalTo(self.contentView.mas_left).with.offset(0); |
| 53 | 52 | make.right.equalTo(self.contentView.mas_right).with.offset(0); |
| ... | ... | @@ -71,44 +70,16 @@ static const NSInteger margin = 12; |
| 71 | 70 | |
| 72 | 71 | }]; |
| 73 | 72 | |
| 74 | - switch (self.model.type) { | |
| 75 | - case CNLiveSettingModelTypeTextFront: | |
| 76 | - { | |
| 77 | - _front.hidden = NO; | |
| 78 | - _content.hidden = NO; | |
| 79 | - [_content mas_updateConstraints:^(MASConstraintMaker *make) { | |
| 80 | - make.top.equalTo(self.title.mas_top).with.offset(0); | |
| 81 | - make.left.equalTo(self.title.mas_right).with.offset(0); | |
| 82 | - make.right.equalTo(self.front.mas_left).with.offset(-margin); | |
| 83 | - make.height.equalTo(self.title.mas_height); | |
| 84 | - | |
| 85 | - }]; | |
| 86 | - } | |
| 87 | - break; | |
| 88 | - case CNLiveSettingModelTypeText: | |
| 89 | - { | |
| 90 | - _front.hidden = YES; | |
| 91 | - _content.hidden = NO; | |
| 92 | - [_content mas_updateConstraints:^(MASConstraintMaker *make) { | |
| 93 | - make.top.equalTo(self.title.mas_top).with.offset(0); | |
| 94 | - make.left.equalTo(self.title.mas_right).with.offset(0); | |
| 95 | - make.right.equalTo(self.mas_right).with.offset(-margin); | |
| 96 | - make.height.equalTo(self.title.mas_height); | |
| 97 | - | |
| 98 | - }]; | |
| 99 | - } | |
| 100 | - break; | |
| 101 | - | |
| 102 | - default: | |
| 103 | - { | |
| 104 | - _front.hidden = NO; | |
| 105 | - _content.hidden = YES; | |
| 106 | - | |
| 107 | - } | |
| 108 | - break; | |
| 109 | - } | |
| 73 | + [_content mas_updateConstraints:^(MASConstraintMaker *make) { | |
| 74 | + make.top.equalTo(self.title.mas_top).with.offset(0); | |
| 75 | + make.left.equalTo(self.title.mas_right).with.offset(0); | |
| 76 | + make.right.equalTo(self.front.mas_left).with.offset(-margin); | |
| 77 | + make.height.equalTo(self.title.mas_height); | |
| 78 | + | |
| 79 | + }]; | |
| 110 | 80 | |
| 111 | 81 | } |
| 82 | + | |
| 112 | 83 | - (void)setLineColor:(UIColor *)lineColor{ |
| 113 | 84 | _lineColor = lineColor; |
| 114 | 85 | _line.backgroundColor = lineColor; | ... | ... |
CNLiveBMineModule/Classes/UserInfo/CNLiveInfoUpdateController.m
| ... | ... | @@ -96,7 +96,7 @@ static const CGFloat timeValue = 1.5; |
| 96 | 96 | #pragma mark - UITextFieldDelegate |
| 97 | 97 | - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { |
| 98 | 98 | self.navigationBar.right.userInteractionEnabled = YES; |
| 99 | - self.navigationBar.right.backgroundColor = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | |
| 99 | + self.navigationBar.right.backgroundColor = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 100 | 100 | NSInteger maxLength = (self.model.dataType == CNLiveUserInfoDataTypeNickname) ? _nickMaxLength : _locMaxLength; |
| 101 | 101 | if (range.location >= maxLength) { |
| 102 | 102 | textField.text = [textField.text substringToIndex:maxLength]; |
| ... | ... | @@ -127,7 +127,7 @@ static const CGFloat timeValue = 1.5; |
| 127 | 127 | #pragma mark - UITextViewDelegate |
| 128 | 128 | - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { |
| 129 | 129 | self.navigationBar.right.userInteractionEnabled = YES; |
| 130 | - self.navigationBar.right.backgroundColor = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | |
| 130 | + self.navigationBar.right.backgroundColor = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 131 | 131 | |
| 132 | 132 | if([text length] != 0) { |
| 133 | 133 | NSLog(@"增"); |
| ... | ... | @@ -252,7 +252,7 @@ static const CGFloat timeValue = 1.5; |
| 252 | 252 | [self.tableView qmui_clearsSelection]; |
| 253 | 253 | |
| 254 | 254 | self.navigationBar.right.userInteractionEnabled = YES; |
| 255 | - self.navigationBar.right.backgroundColor = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | |
| 255 | + self.navigationBar.right.backgroundColor = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 256 | 256 | |
| 257 | 257 | CNLiveInfoUpdateCell *cell = [tableView cellForRowAtIndexPath:indexPath]; |
| 258 | 258 | NSArray *visibleCells = [self.tableView visibleCells]; |
| ... | ... | @@ -356,7 +356,7 @@ static const CGFloat timeValue = 1.5; |
| 356 | 356 | |
| 357 | 357 | NSMutableDictionary *titleAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 358 | 358 | |
| 359 | - titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; | |
| 359 | + titleAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:72/255.0 green:167/255.0 blue:249/255.0 alpha:1.0]; | |
| 360 | 360 | |
| 361 | 361 | NSMutableDictionary *cancelAttributs = [[NSMutableDictionary alloc] initWithDictionary:alertController.alertTitleAttributes]; |
| 362 | 362 | cancelAttributs[NSForegroundColorAttributeName] = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; | ... | ... |
CNLiveBMineModule/Classes/View/CNLiveBMineHeaderView.h
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | NS_ASSUME_NONNULL_BEGIN |
| 12 | 12 | typedef NS_ENUM(NSInteger, CNLiveBMineHeaderViewType) { |
| 13 | 13 | CNLiveBMineHeaderViewTypeUerInfo = 0, |
| 14 | - CNLiveBMineHeaderViewTypeWintess = 1 | |
| 14 | + CNLiveBMineHeaderViewTypeHome = 1 | |
| 15 | 15 | }; |
| 16 | 16 | @class CNLiveBMineHeaderView; |
| 17 | 17 | ... | ... |
CNLiveBMineModule/Classes/View/CNLiveBMineHeaderView.m
| ... | ... | @@ -18,7 +18,9 @@ |
| 18 | 18 | |
| 19 | 19 | @interface CNLiveBMineHeaderView () |
| 20 | 20 | @property (nonatomic, strong) UIImageView *bgView; |
| 21 | -@property (nonatomic, strong) UIButton *witness; | |
| 21 | +@property (nonatomic, strong) UIImageView *bgTopView; | |
| 22 | + | |
| 23 | +@property (nonatomic, strong) UIButton *home; | |
| 22 | 24 | |
| 23 | 25 | @property (nonatomic, strong) UIImageView *header; |
| 24 | 26 | @property (nonatomic, strong) UILabel *name; |
| ... | ... | @@ -65,7 +67,8 @@ static const NSInteger margin = 20; |
| 65 | 67 | |
| 66 | 68 | - (void)createSubViews { |
| 67 | 69 | [self addSubview:self.bgView]; |
| 68 | - [self addSubview:self.witness]; | |
| 70 | + [self addSubview:self.bgTopView]; | |
| 71 | + [self addSubview:self.home]; | |
| 69 | 72 | |
| 70 | 73 | [self addSubview:self.header]; |
| 71 | 74 | [self addSubview:self.name]; |
| ... | ... | @@ -76,10 +79,10 @@ static const NSInteger margin = 20; |
| 76 | 79 | |
| 77 | 80 | - (void)layoutSubviews{ |
| 78 | 81 | [super layoutSubviews]; |
| 79 | - [_witness mas_remakeConstraints:^(MASConstraintMaker *make) { | |
| 82 | + [_home mas_remakeConstraints:^(MASConstraintMaker *make) { | |
| 80 | 83 | make.left.equalTo(self.mas_left); |
| 81 | 84 | make.right.equalTo(self.mas_right); |
| 82 | - make.height.offset(128); | |
| 85 | + make.height.offset(125); | |
| 83 | 86 | make.bottom.equalTo(self.mas_bottom); |
| 84 | 87 | |
| 85 | 88 | }]; |
| ... | ... | @@ -88,13 +91,20 @@ static const NSInteger margin = 20; |
| 88 | 91 | make.left.equalTo(self.mas_left).with.offset(0); |
| 89 | 92 | make.right.equalTo(self.mas_right).with.offset(-0); |
| 90 | 93 | make.top.equalTo(self.mas_top).with.offset(0); |
| 91 | - make.bottom.equalTo(self.witness.mas_top).with.offset(40); | |
| 94 | + make.bottom.equalTo(self.home.mas_top).with.offset(38); | |
| 92 | 95 | |
| 93 | 96 | }]; |
| 94 | 97 | |
| 98 | + [_bgTopView mas_remakeConstraints:^(MASConstraintMaker *make) { | |
| 99 | + make.left.equalTo(self.mas_left).with.offset(margin/1.3); | |
| 100 | + make.right.equalTo(self.mas_right).with.offset(-margin/1.3); | |
| 101 | + make.top.equalTo(self.mas_top).with.offset(55); | |
| 102 | + make.bottom.equalTo(self.mas_bottom); | |
| 103 | + }]; | |
| 104 | + | |
| 95 | 105 | [_header mas_remakeConstraints:^(MASConstraintMaker *make) { |
| 96 | - make.left.equalTo(self.mas_left).with.offset(margin); | |
| 97 | - make.centerY.equalTo(self.bgView.mas_centerY).with.offset(20); | |
| 106 | + make.left.equalTo(self.mas_left).with.offset(1.6*margin); | |
| 107 | + make.top.equalTo(self.mas_top).with.offset(75); | |
| 98 | 108 | make.width.height.offset(60); |
| 99 | 109 | |
| 100 | 110 | }]; |
| ... | ... | @@ -102,7 +112,7 @@ static const NSInteger margin = 20; |
| 102 | 112 | [_certification mas_remakeConstraints:^(MASConstraintMaker *make) { |
| 103 | 113 | make.centerY.equalTo(self.header.mas_centerY); |
| 104 | 114 | make.left.equalTo(self.header.mas_right).with.offset(margin/2.0); |
| 105 | - make.height.offset(25); | |
| 115 | + make.height.offset(28); | |
| 106 | 116 | |
| 107 | 117 | }]; |
| 108 | 118 | |
| ... | ... | @@ -126,7 +136,7 @@ static const NSInteger margin = 20; |
| 126 | 136 | |
| 127 | 137 | - (void)setInteractionEnabled:(BOOL)interactionEnabled{ |
| 128 | 138 | _interactionEnabled = interactionEnabled; |
| 129 | - _witness.userInteractionEnabled = interactionEnabled; | |
| 139 | + _home.userInteractionEnabled = interactionEnabled; | |
| 130 | 140 | } |
| 131 | 141 | |
| 132 | 142 | - (void)setIsRefresh:(BOOL)isRefresh{ |
| ... | ... | @@ -218,24 +228,24 @@ static const NSInteger margin = 20; |
| 218 | 228 | } |
| 219 | 229 | } |
| 220 | 230 | |
| 221 | -- (void)witnessDidClicked:(UIButton *)btn{ | |
| 231 | +- (void)homeDidClicked:(UIButton *)btn{ | |
| 222 | 232 | if (self.delegate && [self.delegate respondsToSelector:@selector(headerView:pushToController:)]) { |
| 223 | 233 | btn.userInteractionEnabled = NO; |
| 224 | - [self.delegate headerView:self pushToController:CNLiveBMineHeaderViewTypeWintess]; | |
| 234 | + [self.delegate headerView:self pushToController:CNLiveBMineHeaderViewTypeHome]; | |
| 225 | 235 | } |
| 226 | 236 | } |
| 227 | 237 | |
| 228 | 238 | #pragma mark - 懒加载 |
| 229 | -- (UIButton *)witness { | |
| 230 | - if (!_witness) { | |
| 231 | - _witness = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 239 | +- (UIButton *)home { | |
| 240 | + if (!_home) { | |
| 241 | + _home = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 232 | 242 | UIImage *xw_image = [self getImageWithImageName:@"mine_zy" bundleName:@"CNLiveBMineModule" targetClass:[CNLiveBMineHeaderView class]]; |
| 233 | - _witness.imageView.contentMode = UIViewContentModeScaleAspectFit; | |
| 234 | - [_witness setBackgroundImage:xw_image forState:UIControlStateNormal]; | |
| 235 | - _witness.adjustsImageWhenHighlighted = NO; | |
| 236 | - [_witness addTarget:self action:@selector(witnessDidClicked:) forControlEvents:UIControlEventTouchUpInside]; | |
| 243 | + _home.imageView.contentMode = UIViewContentModeScaleAspectFit; | |
| 244 | + [_home setBackgroundImage:xw_image forState:UIControlStateNormal]; | |
| 245 | + _home.adjustsImageWhenHighlighted = NO; | |
| 246 | + [_home addTarget:self action:@selector(homeDidClicked:) forControlEvents:UIControlEventTouchUpInside]; | |
| 237 | 247 | } |
| 238 | - return _witness; | |
| 248 | + return _home; | |
| 239 | 249 | } |
| 240 | 250 | - (UIImageView *)bgView { |
| 241 | 251 | if (!_bgView) { |
| ... | ... | @@ -246,6 +256,16 @@ static const NSInteger margin = 20; |
| 246 | 256 | } |
| 247 | 257 | return _bgView; |
| 248 | 258 | } |
| 259 | + | |
| 260 | +- (UIImageView *)bgTopView{ | |
| 261 | + if (!_bgTopView) { | |
| 262 | + _bgTopView = [[UIImageView alloc] init]; | |
| 263 | + _bgTopView.userInteractionEnabled = YES; | |
| 264 | + UIImage *xw_image = [self getImageWithImageName:@"mine_bg_top" bundleName:@"CNLiveBMineModule" targetClass:[CNLiveBMineHeaderView class]]; | |
| 265 | + _bgTopView.image = xw_image; | |
| 266 | + } | |
| 267 | + return _bgTopView; | |
| 268 | +} | |
| 249 | 269 | - (UIImageView *)header { |
| 250 | 270 | if (!_header) { |
| 251 | 271 | _header = [[UIImageView alloc] init]; |
| ... | ... | @@ -265,8 +285,7 @@ static const NSInteger margin = 20; |
| 265 | 285 | _name = [[UILabel alloc] init]; |
| 266 | 286 | _name.userInteractionEnabled = YES; |
| 267 | 287 | _name.numberOfLines = 1; |
| 268 | -// _name.backgroundColor = [UIColor blackColor]; | |
| 269 | - _name.textColor = [UIColor blackColor]; | |
| 288 | + _name.textColor = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; | |
| 270 | 289 | _name.font = [UIFont systemFontOfSize:16]; |
| 271 | 290 | _name.text = CNUserShareModel.nickname; |
| 272 | 291 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(nameTapDidClicked:)]; |
| ... | ... | @@ -289,7 +308,7 @@ static const NSInteger margin = 20; |
| 289 | 308 | if (!_address) { |
| 290 | 309 | _address = [[UILabel alloc] init]; |
| 291 | 310 | _address.numberOfLines = 1; |
| 292 | - _address.textColor = [UIColor colorWithRed:140/255.0 green:140/255.0 blue:142/255.0 alpha:1.0]; | |
| 311 | + _address.textColor = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; | |
| 293 | 312 | _address.font = [UIFont systemFontOfSize:13]; |
| 294 | 313 | _address.attributedText = [self createAttributedImageName:@"mine_location" string:CNUserShareModel.location fontSize:13.0 isFront:YES]; |
| 295 | 314 | } | ... | ... |
Example/CNLiveBMineModule/CNLiveBMineModule-Info.plist
| ... | ... | @@ -2,6 +2,11 @@ |
| 2 | 2 | <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
| 3 | 3 | <plist version="1.0"> |
| 4 | 4 | <dict> |
| 5 | + <key>NSAppTransportSecurity</key> | |
| 6 | + <dict> | |
| 7 | + <key>NSAllowsArbitraryLoads</key> | |
| 8 | + <true/> | |
| 9 | + </dict> | |
| 5 | 10 | <key>CFBundleDevelopmentRegion</key> |
| 6 | 11 | <string>en</string> |
| 7 | 12 | <key>CFBundleDisplayName</key> | ... | ... |