3
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
@property (nonatomic, strong) UIView *versionBadgeView;
|
@property (nonatomic, strong) UIView *versionBadgeView;
|
||||||
@property (nonatomic, strong) UILabel *versionLabel;
|
@property (nonatomic, strong) UILabel *versionLabel;
|
||||||
@property (nonatomic, strong) UILabel *contentTitleLabel;
|
@property (nonatomic, strong) UILabel *contentTitleLabel;
|
||||||
|
@property (nonatomic, strong) UIScrollView *contentScrollView;
|
||||||
@property (nonatomic, strong) UILabel *contentLabel;
|
@property (nonatomic, strong) UILabel *contentLabel;
|
||||||
@property (nonatomic, strong) UIButton *upgradeButton;
|
@property (nonatomic, strong) UIButton *upgradeButton;
|
||||||
@property (nonatomic, strong) UIButton *cancelButton;
|
@property (nonatomic, strong) UIButton *cancelButton;
|
||||||
@@ -51,7 +52,8 @@
|
|||||||
[self addSubview:self.versionBadgeView];
|
[self addSubview:self.versionBadgeView];
|
||||||
[self.versionBadgeView addSubview:self.versionLabel];
|
[self.versionBadgeView addSubview:self.versionLabel];
|
||||||
[self addSubview:self.contentTitleLabel];
|
[self addSubview:self.contentTitleLabel];
|
||||||
[self addSubview:self.contentLabel];
|
[self addSubview:self.contentScrollView];
|
||||||
|
[self.contentScrollView addSubview:self.contentLabel];
|
||||||
[self addSubview:self.cancelButton];
|
[self addSubview:self.cancelButton];
|
||||||
[self addSubview:self.upgradeButton];
|
[self addSubview:self.upgradeButton];
|
||||||
}
|
}
|
||||||
@@ -84,11 +86,16 @@
|
|||||||
make.right.lessThanOrEqualTo(self).offset(-KBFit(20.0));
|
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.left.equalTo(self.contentTitleLabel);
|
||||||
make.top.equalTo(self.contentTitleLabel.mas_bottom).offset(KBFit(8.0));
|
make.top.equalTo(self.contentTitleLabel.mas_bottom).offset(KBFit(8.0));
|
||||||
make.right.lessThanOrEqualTo(self).offset(-KBFit(18));
|
make.right.equalTo(self).offset(-KBFit(24));
|
||||||
make.bottom.lessThanOrEqualTo(self.upgradeButton.mas_top).offset(-KBFit(16.0));
|
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];
|
[self kb_updateButtonsLayout];
|
||||||
@@ -311,6 +318,15 @@
|
|||||||
return _contentLabel;
|
return _contentLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (UIScrollView *)contentScrollView {
|
||||||
|
if (!_contentScrollView) {
|
||||||
|
_contentScrollView = [[UIScrollView alloc] init];
|
||||||
|
_contentScrollView.showsVerticalScrollIndicator = YES;
|
||||||
|
_contentScrollView.showsHorizontalScrollIndicator = NO;
|
||||||
|
}
|
||||||
|
return _contentScrollView;
|
||||||
|
}
|
||||||
|
|
||||||
- (UIButton *)upgradeButton {
|
- (UIButton *)upgradeButton {
|
||||||
if (!_upgradeButton) {
|
if (!_upgradeButton) {
|
||||||
_upgradeButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
_upgradeButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||||
|
|||||||
@@ -259,10 +259,7 @@
|
|||||||
if (buildNumber.length) {
|
if (buildNumber.length) {
|
||||||
params[@"buildNumber"] = buildNumber;
|
params[@"buildNumber"] = buildNumber;
|
||||||
}
|
}
|
||||||
NSNumber *versionCode = [self kb_versionCodeFromBuildNumber:buildNumber shortVersion:shortVersion];
|
params[@"clientVersionCode"] = @(KClientVersionCode);
|
||||||
// if (versionCode) {
|
|
||||||
params[@"clientVersionCode"] = @1;
|
|
||||||
// }
|
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
#ifndef KeyBoardPrefixHeader_pch
|
#ifndef KeyBoardPrefixHeader_pch
|
||||||
#define KeyBoardPrefixHeader_pch
|
#define KeyBoardPrefixHeader_pch
|
||||||
|
|
||||||
|
/// APP 必须和后端同步
|
||||||
|
#define KClientVersionCode 1
|
||||||
|
|
||||||
//Bugly
|
//Bugly
|
||||||
#define BuglyId @"5736ce7a19"
|
#define BuglyId @"5736ce7a19"
|
||||||
|
|||||||
Reference in New Issue
Block a user