Skip to content

Commit

Permalink
适配英文长度过长部分问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ccharlesren committed Apr 7, 2021
1 parent 151063e commit 6a87af4
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ - (void)setupUI{
[procolTV mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(emailRegisterBtn.mas_bottom).offset(40 * kScreenAllHeightScale);
make.centerX.equalTo(self.view).offset(15);
if (LanguageIsEnglish) {
make.left.equalTo(self.view.mas_left).offset(40);
make.right.equalTo(self.view.mas_right).offset(-40);
}

}];

self.procolBtn = [UIButton buttonWithType:UIButtonTypeCustom];
Expand All @@ -111,7 +116,12 @@ - (void)setupUI{
[self.procolBtn setImage:[UIImage imageNamed:@"agree_selected"] forState:UIControlStateSelected];
[self.view addSubview:self.procolBtn];
[self.procolBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.equalTo(procolTV);

if (LanguageIsEnglish) {
make.centerY.equalTo(procolTV).offset(-8);
}else {
make.centerY.equalTo(procolTV);
}
make.width.height.mas_equalTo(30);
make.right.equalTo(procolTV.mas_left);
}];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,14 @@ - (UIView *)bottomView {
[protocolDetailBtn setTitleColor:[UIColor colorWithHexString:kIntelligentMainHexColor] forState:UIControlStateNormal];
[protocolDetailBtn addTarget:self action:@selector(cancelProtocolClick) forControlEvents:UIControlEventTouchUpInside];
protocolDetailBtn.titleLabel.font = [UIFont wcPfRegularFontOfSize:14];
protocolDetailBtn.titleLabel.numberOfLines = 0;
[_bottomView addSubview:protocolDetailBtn];
[protocolDetailBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.equalTo(cancelProtocolLabel.mas_trailing);
make.centerY.equalTo(self.protocolButton.mas_centerY);
if (LanguageIsEnglish) {
make.right.equalTo(_bottomView.mas_right).offset(-15);
}
}];

UIView *line2 = [[UIView alloc]init];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,16 @@ - (void)setupUI{
}

UILabel *tipLabel = [[UILabel alloc] init];
tipLabel.bounds = CGRectMake(0, 0, stepLabelWidth, stepLabelWidth);
tipLabel.bounds = CGRectMake(0, 0, kScreenWidth/_titlesArray.count, stepLabelWidth);
tipLabel.text = _titlesArray[i];
tipLabel.numberOfLines = 0;
tipLabel.font = [UIFont wcPfRegularFontOfSize:12];
[tipLabel sizeToFit];
tipLabel.center = CGPointMake(stepLabel.center.x, CGRectGetMaxY(stepLabel.frame) + 18.0f);
CGFloat xOffet = stepLabel.center.x;
if (i == 0) {
xOffet = stepLabel.center.x + 20;
}
tipLabel.center = CGPointMake(xOffet, CGRectGetMaxY(stepLabel.frame) + 18.0f);
[self addSubview:tipLabel];

if (self.step < i+1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Copyright © 2020 Tencent. All rights reserved.
*/

CFBundleName = "连连开源体验";
CFBundleName = "Lianlian";
NSBluetoothAlwaysUsageDescription = "打开蓝牙用于扫描硬件";
NSBluetoothPeripheralUsageDescription = "打开蓝牙用于扫描硬件";
NSCameraUsageDescription = "获取相机权限用于扫描设备二维码";
Expand Down

0 comments on commit 6a87af4

Please sign in to comment.