处理kbpayvip
This commit is contained in:
@@ -11,10 +11,10 @@
|
||||
// 容器(为了便于以 KB_NAV_TOTAL_HEIGHT 作为内容起点)
|
||||
@property (nonatomic, strong) UIView *containerView;
|
||||
// 顶部大图:pay_vip_icon
|
||||
@property (nonatomic, strong) UIImageView *vipImageView;
|
||||
@property (nonatomic, strong) UIImageView *wanImageView;
|
||||
@property (nonatomic, strong) UILabel *titleLabel;
|
||||
@property (nonatomic, strong) UILabel *desLabel;
|
||||
//@property (nonatomic, strong) UIImageView *vipImageView;
|
||||
//@property (nonatomic, strong) UIImageView *wanImageView;
|
||||
//@property (nonatomic, strong) UILabel *titleLabel;
|
||||
//@property (nonatomic, strong) UILabel *desLabel;
|
||||
|
||||
// 功能图标四宫格
|
||||
@property (nonatomic, strong) UIImageView *aiImageView;
|
||||
@@ -34,32 +34,6 @@
|
||||
make.edges.equalTo(self);
|
||||
}];
|
||||
|
||||
// 1. 顶部大图(略微下移,避开自定义导航栏)
|
||||
[self.containerView addSubview:self.vipImageView];
|
||||
[self.vipImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.left.equalTo(self.containerView).inset(KBFit(27));
|
||||
make.top.equalTo(self.containerView).offset(KB_NAV_TOTAL_HEIGHT + 25);
|
||||
make.height.mas_equalTo((269));
|
||||
}];
|
||||
[self.containerView addSubview:self.wanImageView];
|
||||
[self.wanImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.left.equalTo(self.containerView);
|
||||
make.top.equalTo(self.vipImageView).offset(70);
|
||||
make.bottom.equalTo(self.containerView).offset(-16);
|
||||
}];
|
||||
|
||||
[self.containerView addSubview:self.titleLabel];
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.equalTo(self.containerView);
|
||||
make.top.equalTo(self.wanImageView).offset(53);
|
||||
}];
|
||||
[self.containerView addSubview:self.desLabel];
|
||||
[self.desLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.equalTo(self.containerView);
|
||||
make.top.equalTo(self.titleLabel.mas_bottom).offset(10);
|
||||
}];
|
||||
|
||||
|
||||
// 2. 下方四宫格图标(简单示意)
|
||||
UIView *g1 = [self gridItemWithImageView:self.aiImageView];
|
||||
UIView *g2 = [self gridItemWithImageView:self.keyboardImageView];
|
||||
@@ -72,12 +46,12 @@
|
||||
|
||||
CGFloat spacing = 16;
|
||||
[g1 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.vipImageView);
|
||||
make.top.equalTo(self.desLabel.mas_bottom).offset(18);
|
||||
make.left.equalTo(self.containerView).inset(KBFit(27));
|
||||
make.top.equalTo(self.containerView).offset(KB_NAV_TOTAL_HEIGHT + 25);
|
||||
make.height.mas_equalTo(((KBFit(122))));
|
||||
}];
|
||||
[g2 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.equalTo(self.vipImageView);
|
||||
make.right.equalTo(self.containerView).inset(KBFit(27));
|
||||
make.top.equalTo(g1);
|
||||
make.height.equalTo(g1);
|
||||
make.left.equalTo(g1.mas_right).offset(spacing);
|
||||
@@ -90,7 +64,7 @@
|
||||
make.width.equalTo(g1);
|
||||
}];
|
||||
[g4 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.equalTo(self.vipImageView);
|
||||
make.right.equalTo(g2);
|
||||
make.top.equalTo(g3);
|
||||
make.left.equalTo(g3.mas_right).offset(spacing);
|
||||
make.height.equalTo(g1);
|
||||
@@ -144,21 +118,7 @@
|
||||
return _containerView;
|
||||
}
|
||||
|
||||
- (UIImageView *)vipImageView {
|
||||
if (!_vipImageView) {
|
||||
_vipImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"pay_vip_icon"]];
|
||||
_vipImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _vipImageView;
|
||||
}
|
||||
|
||||
- (UIImageView *)wanImageView {
|
||||
if (!_wanImageView) {
|
||||
_wanImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"pay_wanwhite_icon"]];
|
||||
_wanImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _wanImageView;
|
||||
}
|
||||
|
||||
- (UIImageView *)aiImageView {
|
||||
if (!_aiImageView) {
|
||||
@@ -190,23 +150,4 @@
|
||||
}
|
||||
|
||||
|
||||
- (UILabel *)titleLabel{
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.text = @"Become a member of LOVE KEY";
|
||||
_titleLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_titleLabel.font = [KBFont bold:18];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
- (UILabel *)desLabel{
|
||||
if (!_desLabel) {
|
||||
_desLabel = [[UILabel alloc] init];
|
||||
_desLabel.text = @"Unlock all functions";
|
||||
_desLabel.textColor = [UIColor colorWithHex:KBBlackValue];
|
||||
_desLabel.font = [KBFont medium:14];
|
||||
}
|
||||
return _desLabel;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user