阿拉伯语适配
This commit is contained in:
@@ -254,11 +254,17 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
|
||||
|
||||
|
||||
|
||||
CGFloat left = isMSRTL() ? -11 : 11;
|
||||
CGFloat protocolWidth = 204;
|
||||
if (isMSRTL()){
|
||||
protocolWidth = 250;
|
||||
}else if (isMSEN()){
|
||||
protocolWidth = 270;
|
||||
}
|
||||
[self.protocolLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.view).offset(10);
|
||||
make.trailing.mas_lessThanOrEqualTo(-10);
|
||||
make.centerX.mas_equalTo(self.view).offset(left);
|
||||
make.height.mas_greaterThanOrEqualTo(22);
|
||||
make.width.mas_equalTo(protocolWidth);
|
||||
make.bottom.mas_equalTo(-kGetScaleWidth(35));
|
||||
}];
|
||||
[self.agreeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -276,7 +282,8 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
}];
|
||||
[self.authBubbleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.leading.mas_equalTo(8);
|
||||
make.bottom.mas_equalTo(self.authBubbleView).mas_offset(-6);
|
||||
make.trailing.mas_equalTo(-8);
|
||||
make.bottom.mas_equalTo(self.authBubbleView).mas_offset(isMSZH() ? -6:0);
|
||||
}];
|
||||
if (@available(iOS 13.0, *)) {
|
||||
#ifdef DEBUG
|
||||
@@ -424,6 +431,12 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
}
|
||||
/// 登录
|
||||
- (void)loginBtnClicked {
|
||||
if (!self.agreeBtn.selected) {
|
||||
[UIView animateWithDuration:0.5 animations:^{
|
||||
self.authBubbleView.alpha = 1.0;
|
||||
}];
|
||||
return;
|
||||
}
|
||||
[XNDJTDDLoadingTool showOnlyView:self.view];
|
||||
if(self.selectType == 0){
|
||||
NSString *phone = self.accountView.inputTextField.text;
|
||||
@@ -553,10 +566,10 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
|
||||
NSMutableAttributedString *attString = [[NSMutableAttributedString alloc] initWithString:YMLocalizedString(@"XPLoginViewController6")];
|
||||
attString.yy_color = UIColorFromRGB(0xB3B3C3);
|
||||
NSString *userString = YMLocalizedString(@"XPLoginViewController7");
|
||||
NSMutableAttributedString *userAttString = [[NSMutableAttributedString alloc] initWithString:userString attributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0x1F1B4F)}];
|
||||
@weakify(self)
|
||||
[userAttString yy_setTextHighlightRange:NSMakeRange(0, userAttString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
NSRange userRange = [attString.string rangeOfString:YMLocalizedString(@"XPLoginViewController7")];
|
||||
[attString addAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0x1F1B4F)} range:userRange];
|
||||
@weakify(self);
|
||||
[attString yy_setTextHighlightRange:userRange color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
@strongify(self);
|
||||
// 跳转用户协议
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
@@ -564,20 +577,19 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
} longPressAction:nil];
|
||||
|
||||
NSMutableAttributedString *andString = [[NSMutableAttributedString alloc] initWithString:YMLocalizedString(@"XPLoginViewController8")];
|
||||
andString.yy_color = UIColorFromRGB(0xB3B3C3);
|
||||
NSString *protocolString = YMLocalizedString(@"XPLoginViewController9");
|
||||
NSMutableAttributedString *privateString = [[NSMutableAttributedString alloc] initWithString:protocolString attributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0x1F1B4F)}];
|
||||
[privateString yy_setTextHighlightRange:NSMakeRange(0, privateString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
NSRange andRange = [attString.string rangeOfString:YMLocalizedString(@"XPLoginViewController8")];
|
||||
[attString addAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xB3B3C3)} range:andRange];
|
||||
NSRange protocolRange = [attString.string rangeOfString:YMLocalizedString(@"XPLoginViewController9")];
|
||||
[attString addAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0x1F1B4F)} range:protocolRange];
|
||||
|
||||
[attString yy_setTextHighlightRange:protocolRange color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
@strongify(self);
|
||||
// 跳转隐私政策
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
webVC.url = URLWithType(kPrivacyURL);
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
} longPressAction:nil];
|
||||
[attString appendAttributedString:userAttString];
|
||||
[attString appendAttributedString:andString];
|
||||
[attString appendAttributedString:privateString];
|
||||
|
||||
|
||||
_protocolLabel.attributedText = attString;
|
||||
}
|
||||
@@ -610,8 +622,9 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
|
||||
if (!_authBubbleLabel) {
|
||||
_authBubbleLabel = [[UILabel alloc] init];
|
||||
_authBubbleLabel.text = YMLocalizedString(@"XPLoginViewController11");
|
||||
_authBubbleLabel.font = [UIFont systemFontOfSize:10];
|
||||
_authBubbleLabel.font = [UIFont systemFontOfSize:9];
|
||||
_authBubbleLabel.textColor = UIColor.whiteColor;
|
||||
_authBubbleLabel.numberOfLines = 2;
|
||||
}
|
||||
return _authBubbleLabel;
|
||||
}
|
||||
|
Reference in New Issue
Block a user