Skip to content

Commit 52131e5

Browse files
tonychanchenoldcodefarmer
authored andcommitted
权限检测UI
Change-Id: I855988b7698dee117150c90aba98e2364d34e65d
1 parent 2392a7c commit 52131e5

File tree

12 files changed

+573
-78
lines changed

12 files changed

+573
-78
lines changed

Source/LinkApp/Classes/AppConfig/AppUIConfig/TIoTAlertView.m

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,17 @@ - (void)setUpPricyViews {
146146
self.procolTV.textColor = [UIColor colorWithHexString:@"#888888"];
147147
self.procolTV.delegate = self;
148148
self.procolTV.editable = NO; //必须禁止输入,否则点击将弹出输入键盘
149-
self.procolTV.scrollEnabled = NO;
149+
self.procolTV.scrollEnabled = YES;
150150
[bgView addSubview:self.procolTV];
151151
[self.procolTV mas_makeConstraints:^(MASConstraintMaker *make) {
152152
make.leading.mas_equalTo(20);
153153
make.trailing.mas_equalTo(-20);
154154
make.top.equalTo(self.nameL.mas_bottom).offset(20);
155+
make.height.mas_equalTo(300);
155156
}];
156157

157158

158-
UITextView *procolTV1 = [[UITextView alloc] init];
159+
/*UITextView *procolTV1 = [[UITextView alloc] init];
159160
procolTV1.attributedText = [self protolStr];;
160161
procolTV1.linkTextAttributes = @{NSForegroundColorAttributeName:[UIColor colorWithHexString:kIntelligentMainHexColor]}; //
161162
procolTV1.textColor = [UIColor colorWithHexString:kRegionHexColor];
@@ -180,15 +181,15 @@ - (void)setUpPricyViews {
180181
make.top.equalTo(procolTV1.mas_top).offset(4);
181182
make.width.height.mas_equalTo(30);
182183
make.right.equalTo(procolTV1.mas_left);
183-
}];
184+
}];*/
184185

185186
UIView *line = [[UIView alloc]init];
186187
line.backgroundColor = kLineColor;
187188
[bgView addSubview:line];
188189
[line mas_makeConstraints:^(MASConstraintMaker *make) {
189190
make.leading.trailing.equalTo(bgView);
190191
make.height.mas_equalTo(1);
191-
make.top.equalTo(procolTV1.mas_bottom).offset(20 *kScreenAllHeightScale);
192+
make.top.equalTo(self.procolTV.mas_bottom).offset(20 *kScreenAllHeightScale);
192193
}];
193194

194195
UIStackView *stack = [[UIStackView alloc] init];
@@ -203,7 +204,7 @@ - (void)setUpPricyViews {
203204
}];
204205

205206
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
206-
[btn setTitle:NSLocalizedString(@"cancel", @"取消") forState:UIControlStateNormal];
207+
[btn setTitle:NSLocalizedString(@"register_privacy_policy_btn1", @"取消") forState:UIControlStateNormal];
207208
[btn setTitleColor:[UIColor colorWithHexString:@"#6C7078"] forState:UIControlStateNormal];
208209
btn.titleLabel.font = [UIFont wcPfRegularFontOfSize:16];
209210
[btn setBackgroundColor:[UIColor whiteColor]];
@@ -222,7 +223,7 @@ - (void)setUpPricyViews {
222223
}];
223224

224225
UIButton *btn2 = [UIButton buttonWithType:UIButtonTypeCustom];
225-
[btn2 setTitle:NSLocalizedString(@"confirm", @"确定") forState:UIControlStateNormal];
226+
[btn2 setTitle:NSLocalizedString(@"register_privacy_policy_btn2", @"确定") forState:UIControlStateNormal];
226227
[btn2 setTitleColor:[UIColor colorWithHexString:kIntelligentMainHexColor] forState:UIControlStateNormal];
227228
[btn2 setBackgroundColor:[UIColor whiteColor]];
228229
btn2.titleLabel.font = [UIFont wcPfRegularFontOfSize:16];
@@ -478,7 +479,9 @@ - (NSMutableAttributedString *)conentTextProtolString {
478479
NSString *str3 = NSLocalizedString(@"register_privacy_policy_conte3", @"");
479480
NSString *str4 = NSLocalizedString(@"register_privacy_policy_conte4", @"隐私政策");
480481
NSString *str5 = NSLocalizedString(@"register_privacy_policy_conte5", nil);
481-
NSString *showStr = [NSString stringWithFormat:@"%@%@%@%@%@",str1,str2,str3,str4,str5];
482+
NSString *str6 = NSLocalizedString(@"register_privacy_policy_conte6", @"第三方sdk");
483+
NSString *str7 = NSLocalizedString(@"register_privacy_policy_conte7", nil);
484+
NSString *showStr = [NSString stringWithFormat:@"%@%@%@%@%@%@%@",str1,str2,str3,str4,str5,str6,str7];
482485

483486
NSMutableParagraphStyle *pstype = [[NSMutableParagraphStyle alloc] init];
484487
[pstype setAlignment:NSTextAlignmentLeft];
@@ -490,10 +493,14 @@ - (NSMutableAttributedString *)conentTextProtolString {
490493
NSRange range2 = [showStr rangeOfString:str2];
491494
[mastring addAttributes:@{NSLinkAttributeName:valueString2,/*NSUnderlineStyleAttributeName:[NSNumber numberWithInteger:NSUnderlineStyleSingle],*/NSFontAttributeName:[UIFont wcPfRegularFontOfSize:14],} range:range2];
492495

493-
NSString *valueString4 = [[NSString stringWithFormat:@"Privacy4://%@",str2] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]];
496+
NSString *valueString4 = [[NSString stringWithFormat:@"Privacy4://%@",str4] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]];
494497
NSRange range4 = [showStr rangeOfString:str4];
495498
[mastring addAttributes:@{NSLinkAttributeName:valueString4,/*NSUnderlineStyleAttributeName:[NSNumber numberWithInteger:NSUnderlineStyleSingle],*/NSFontAttributeName:[UIFont wcPfRegularFontOfSize:14],} range:range4];
496499

500+
NSString *valueString6 = [[NSString stringWithFormat:@"Privacy6://%@",str6] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]];
501+
NSRange range6 = [showStr rangeOfString:str6];
502+
[mastring addAttributes:@{NSLinkAttributeName:valueString6,/*NSUnderlineStyleAttributeName:[NSNumber numberWithInteger:NSUnderlineStyleSingle],*/NSFontAttributeName:[UIFont wcPfRegularFontOfSize:14],} range:range6];
503+
497504
_conentTextProtolString = mastring;
498505
}
499506
return _conentTextProtolString;
@@ -519,6 +526,12 @@ - (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRan
519526
self.doneAction([URL scheme]);
520527
}
521528
return NO;
529+
}else if ([[URL scheme] isEqualToString:@"Privacy6"]) {
530+
[self removeView];
531+
if (self.doneAction) {
532+
self.doneAction([URL scheme]);
533+
}
534+
return NO;
522535
}
523536
return YES;
524537
}
@@ -535,15 +548,15 @@ - (void)cancle
535548

536549
- (void)done
537550
{
538-
if (self.procolBtn.selected) {
551+
// if (self.procolBtn.selected) {
539552

540553
[self removeView];
541554
if (self.doneAction) {
542555
self.doneAction(self.messageT.text);
543556
}
544-
}else {
545-
[MBProgressHUD showError:@"请点击同意按钮"];
546-
}
557+
// }else {
558+
// [MBProgressHUD showError:@"请点击同意按钮"];
559+
// }
547560
}
548561

549562
- (void)removeView {

Source/LinkApp/Classes/Module/Debug/TIoTAPPConfig.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@ class TIoTAPPConfig: NSObject {
9797
return "https://imgcache.qq.com/qzone/qzactStatics/qcloud/data/42/config9.js"
9898
}
9999

100+
// static config 中国区-第三方sdk目录
101+
public static var userThridSDKChChineseString: NSString {
102+
return "https://imgcache.qq.com/qzone/qzactStatics/qcloud/data/42/config12.js"
103+
}
104+
105+
// static config 中国区-第三方sdk目录英文
106+
public static var userThridSDKChEnglishString: NSString {
107+
return "https://imgcache.qq.com/qzone/qzactStatics/qcloud/data/42/config13.js"
108+
}
100109
}
101110

102111

Source/LinkApp/Classes/Module/Login/Controller/TIoTMainVC.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//
66

77
#import "TIoTMainVC.h"
8-
#import "TIoTRegisterViewController.h"
8+
#import "TIoTRegionViewController.h"
99
#import "TIoTVCLoginAccountVC.h"
1010
#import "TIoTSingleCustomButton.h"
1111
#import "UIButton+LQRelayout.h"
@@ -115,7 +115,7 @@ - (UIButton *)loginButton {
115115
}
116116

117117
- (void)createNewAccount {
118-
TIoTRegisterViewController *registerVC = [[TIoTRegisterViewController alloc]init];
118+
TIoTRegionViewController *registerVC = [[TIoTRegionViewController alloc]init];
119119
[self.navigationController pushViewController:registerVC animated:YES];
120120
}
121121

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//
2+
// TIoTRegionViewController.h
3+
// LinkApp
4+
//
5+
// Created by eagleychen on 2021/10/25.
6+
// Copyright © 2021 Tencent. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
NS_ASSUME_NONNULL_BEGIN
12+
13+
@interface TIoTRegionViewController : UIViewController
14+
@property (nonatomic, copy) NSString *defaultPhoneOrEmail;
15+
16+
@end
17+
18+
NS_ASSUME_NONNULL_END

0 commit comments

Comments
 (0)