diff --git a/keyBoard/Class/Common/V/KBAppUpdateView.m b/keyBoard/Class/Common/V/KBAppUpdateView.m index f5c1bfd..1177b0a 100644 --- a/keyBoard/Class/Common/V/KBAppUpdateView.m +++ b/keyBoard/Class/Common/V/KBAppUpdateView.m @@ -12,6 +12,7 @@ @property (nonatomic, strong) UIView *versionBadgeView; @property (nonatomic, strong) UILabel *versionLabel; @property (nonatomic, strong) UILabel *contentTitleLabel; +@property (nonatomic, strong) UIScrollView *contentScrollView; @property (nonatomic, strong) UILabel *contentLabel; @property (nonatomic, strong) UIButton *upgradeButton; @property (nonatomic, strong) UIButton *cancelButton; @@ -51,7 +52,8 @@ [self addSubview:self.versionBadgeView]; [self.versionBadgeView addSubview:self.versionLabel]; [self addSubview:self.contentTitleLabel]; - [self addSubview:self.contentLabel]; + [self addSubview:self.contentScrollView]; + [self.contentScrollView addSubview:self.contentLabel]; [self addSubview:self.cancelButton]; [self addSubview:self.upgradeButton]; } @@ -84,11 +86,16 @@ make.right.lessThanOrEqualTo(self).offset(-KBFit(20.0)); }]; - [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) { + [self.contentScrollView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.contentTitleLabel); make.top.equalTo(self.contentTitleLabel.mas_bottom).offset(KBFit(8.0)); - make.right.lessThanOrEqualTo(self).offset(-KBFit(18)); - make.bottom.lessThanOrEqualTo(self.upgradeButton.mas_top).offset(-KBFit(16.0)); + make.right.equalTo(self).offset(-KBFit(24)); + make.bottom.equalTo(self.upgradeButton.mas_top).offset(-KBFit(16.0)); + }]; + + [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self.contentScrollView); + make.width.equalTo(self.contentScrollView); }]; [self kb_updateButtonsLayout]; @@ -311,6 +318,15 @@ return _contentLabel; } +- (UIScrollView *)contentScrollView { + if (!_contentScrollView) { + _contentScrollView = [[UIScrollView alloc] init]; + _contentScrollView.showsVerticalScrollIndicator = YES; + _contentScrollView.showsHorizontalScrollIndicator = NO; + } + return _contentScrollView; +} + - (UIButton *)upgradeButton { if (!_upgradeButton) { _upgradeButton = [UIButton buttonWithType:UIButtonTypeCustom]; diff --git a/keyBoard/Class/Login/VM/KBLoginVM.m b/keyBoard/Class/Login/VM/KBLoginVM.m index 0d2c619..ebd764b 100644 --- a/keyBoard/Class/Login/VM/KBLoginVM.m +++ b/keyBoard/Class/Login/VM/KBLoginVM.m @@ -259,10 +259,7 @@ if (buildNumber.length) { params[@"buildNumber"] = buildNumber; } - NSNumber *versionCode = [self kb_versionCodeFromBuildNumber:buildNumber shortVersion:shortVersion]; -// if (versionCode) { - params[@"clientVersionCode"] = @1; -// } + params[@"clientVersionCode"] = @(KClientVersionCode); return params; } diff --git a/keyBoard/KeyBoardPrefixHeader.pch b/keyBoard/KeyBoardPrefixHeader.pch index 56697d9..9ef7f23 100644 --- a/keyBoard/KeyBoardPrefixHeader.pch +++ b/keyBoard/KeyBoardPrefixHeader.pch @@ -8,6 +8,8 @@ #ifndef KeyBoardPrefixHeader_pch #define KeyBoardPrefixHeader_pch +/// APP 必须和后端同步 +#define KClientVersionCode 1 //Bugly #define BuglyId @"5736ce7a19"