diff --git a/Shared/Localization/en.lproj/Localizable.strings b/Shared/Localization/en.lproj/Localizable.strings index ac20ff9..c25c1c0 100644 --- a/Shared/Localization/en.lproj/Localizable.strings +++ b/Shared/Localization/en.lproj/Localizable.strings @@ -129,6 +129,10 @@ "Editor" = "Editor"; "Cancel" = "Cancel"; "Delete" = "Delete"; +"Points\nMall" = "Points\nMall"; +"Log Out" = "Log Out"; +"Ranking List" = "Ranking List"; +"Persona circle" = "Persona circle"; diff --git a/Shared/Localization/zh-Hans.lproj/Localizable.strings b/Shared/Localization/zh-Hans.lproj/Localizable.strings index 09daa7e..7ebc6aa 100644 --- a/Shared/Localization/zh-Hans.lproj/Localizable.strings +++ b/Shared/Localization/zh-Hans.lproj/Localizable.strings @@ -129,6 +129,10 @@ "Editor" = "编辑"; "Cancel" = "取消"; "Delete" = "删除"; +"Points\nMall" = "积分\n商城"; +"Log Out" = "退出"; +"Ranking List" = "排行榜"; +"Persona circle" = "圈子"; // 皮肤示例名称 "极光" = "极光"; diff --git a/keyBoard/Class/Home/V/KBPanModalView.m b/keyBoard/Class/Home/V/KBPanModalView.m index b24f48c..2ca2a3a 100644 --- a/keyBoard/Class/Home/V/KBPanModalView.m +++ b/keyBoard/Class/Home/V/KBPanModalView.m @@ -212,7 +212,7 @@ // 两个按钮 self.hotButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [self.hotButton setTitle:@"Ranking List" forState:UIControlStateNormal]; + [self.hotButton setTitle:KBLocalized(@"Ranking List") forState:UIControlStateNormal]; [self.hotButton setTitleColor:[UIColor darkTextColor] forState:UIControlStateNormal]; [self.hotButton setTitleColor:[UIColor blackColor] forState:UIControlStateSelected]; self.hotButton.titleLabel.font = [UIFont boldSystemFontOfSize:16]; @@ -221,7 +221,7 @@ [self.topBar addSubview:self.hotButton]; self.rankButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [self.rankButton setTitle:@"Persona circle" forState:UIControlStateNormal]; + [self.rankButton setTitle:KBLocalized(@"Persona circle") forState:UIControlStateNormal]; [self.rankButton setTitleColor:[UIColor darkTextColor] forState:UIControlStateNormal]; [self.rankButton setTitleColor:[UIColor blackColor] forState:UIControlStateSelected]; self.rankButton.titleLabel.font = [UIFont boldSystemFontOfSize:16]; diff --git a/keyBoard/Class/Home/VC/FunctionTest/KBSkinCenterVC.m b/keyBoard/Class/Home/VC/FunctionTest/KBSkinCenterVC.m index c13a7b0..d3e5c10 100644 --- a/keyBoard/Class/Home/VC/FunctionTest/KBSkinCenterVC.m +++ b/keyBoard/Class/Home/VC/FunctionTest/KBSkinCenterVC.m @@ -26,7 +26,7 @@ [_applyBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.right.equalTo(self.contentView).offset(-16); make.centerY.equalTo(self.contentView); - make.width.mas_equalTo(110); + make.width.mas_greaterThanOrEqualTo(110); make.height.mas_equalTo(34); }]; } diff --git a/keyBoard/Class/Me/V/KBMyHeaderView.m b/keyBoard/Class/Me/V/KBMyHeaderView.m index 06f8771..3ed58fa 100644 --- a/keyBoard/Class/Me/V/KBMyHeaderView.m +++ b/keyBoard/Class/Me/V/KBMyHeaderView.m @@ -44,7 +44,7 @@ make.centerY.equalTo(self.titleLabel); make.right.equalTo(self).offset(-20); make.height.mas_equalTo(34); - make.width.mas_greaterThanOrEqualTo(110); + make.width.mas_greaterThanOrEqualTo(90); }]; [self.avatarView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self).offset(26); @@ -124,14 +124,22 @@ _keyboardBtn.layer.cornerRadius = 17; _keyboardBtn.layer.masksToBounds = YES; - // 图标 + 文本,图文间距 6 + // 图标 + 文本,保持不同语言下左右内边距一致 UIImage *kbImg = [UIImage imageNamed:@"my_kb_icon"]; if (kbImg) { [_keyboardBtn setImage:kbImg forState:UIControlStateNormal]; _keyboardBtn.imageView.contentMode = UIViewContentModeScaleAspectFit; - CGFloat spacing = 3.0; - _keyboardBtn.contentEdgeInsets = UIEdgeInsetsMake(0, spacing, 0, spacing); - _keyboardBtn.titleEdgeInsets = UIEdgeInsetsMake(0, spacing, 0, -spacing); + // 按钮左右内边距(与文字无关,始终生效) + CGFloat horizontalPadding = 10.0; + _keyboardBtn.contentEdgeInsets = UIEdgeInsetsMake(0, horizontalPadding, 0, horizontalPadding); + // 图片与文字之间的间距 + CGFloat spacing = 6.0; + _keyboardBtn.imageEdgeInsets = UIEdgeInsetsMake(0, -spacing / 2.0, 0, spacing / 2.0); + _keyboardBtn.titleEdgeInsets = UIEdgeInsetsMake(0, spacing / 2.0, 0, -spacing / 2.0); + + // 保证宽度由内容决定,避免中英文长度不同导致被压扁 + [_keyboardBtn setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; + [_keyboardBtn setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; } // 点击事件 diff --git a/keyBoard/Class/Search/V/KBSearchBarView.m b/keyBoard/Class/Search/V/KBSearchBarView.m index 75910be..8b133df 100644 --- a/keyBoard/Class/Search/V/KBSearchBarView.m +++ b/keyBoard/Class/Search/V/KBSearchBarView.m @@ -36,7 +36,7 @@ [self.searchButton mas_makeConstraints:^(MASConstraintMaker *make) { make.centerY.equalTo(self.bgView); make.right.equalTo(self.bgView).offset(-8); - make.width.mas_equalTo(84); + make.width.mas_greaterThanOrEqualTo(84); make.height.mas_equalTo(32); }]; diff --git a/keyBoard/Class/Shop/V/KBShopHeadView.m b/keyBoard/Class/Shop/V/KBShopHeadView.m index 0fa6d6c..813a12d 100644 --- a/keyBoard/Class/Shop/V/KBShopHeadView.m +++ b/keyBoard/Class/Shop/V/KBShopHeadView.m @@ -132,7 +132,7 @@ [self.rechargeButton mas_makeConstraints:^(MASConstraintMaker *make) { make.bottom.equalTo(self.infoCard).offset(-32); make.right.equalTo(self.infoCard).offset(-15); - make.width.mas_equalTo(114); + make.width.mas_greaterThanOrEqualTo(114); make.height.mas_equalTo(42); }]; }