3
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user