修改了我的页面中顶部视图约束冲突的
This commit is contained in:
@@ -80,8 +80,6 @@
|
||||
|
||||
|
||||
@interface XPMineAccountView ()
|
||||
///容器
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
///我的账户
|
||||
@property (nonatomic,strong) XPMineAccountSubView *accountView;
|
||||
///推荐好友
|
||||
@@ -101,29 +99,23 @@
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.stackView];
|
||||
|
||||
[self.stackView addArrangedSubview:self.accountView];
|
||||
[self.stackView addArrangedSubview:self.recommendView];
|
||||
[self addSubview:self.accountView];
|
||||
[self addSubview:self.recommendView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self).inset(15);
|
||||
[self.accountView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self).inset(15);
|
||||
make.top.bottom.mas_equalTo(self);
|
||||
make.right.mas_equalTo(self.recommendView.mas_left).offset(-15);;
|
||||
}];
|
||||
|
||||
[self.recommendView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self).offset(-15);
|
||||
make.top.bottom.width.mas_equalTo(self.accountView);
|
||||
}];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (UIStackView *)stackView {
|
||||
if (!_stackView) {
|
||||
_stackView = [[UIStackView alloc] init];
|
||||
_stackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_stackView.distribution = UIStackViewDistributionFillEqually;
|
||||
_stackView.alignment = UIStackViewAlignmentFill;
|
||||
_stackView.spacing = 15;
|
||||
}
|
||||
return _stackView;
|
||||
}
|
||||
|
||||
- (XPMineAccountSubView *)accountView {
|
||||
if (!_accountView) {
|
||||
|
Reference in New Issue
Block a user