不用再写了:《《《 [self.myScrollView setContentSize:CGSizeMake(kScreenWidth, CGRectGetMaxY(self.gongWeiLocationCollectionView.frame)+kIPhoneXBottomHeight)];》》》
直接这样:先:
[self.view addSubview:self.myScrollView];
[self.myScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.topBarView.mas_bottom).with.offset(kAutoW(0));
make.width.mas_equalTo (kScreenWidth);
make.left.right.mas_equalTo(0);
make.bottom.mas_equalTo(kAutoW(-kIPhoneXBottomHeight));
}];
然后最后一个添加的ui的 bottom.这样:make.bottom.equalTo(_myScrollView.mas_bottom).with.offset(-20);就可以了
[_downloadImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.view);
// make.left.equalTo(self.view).with.offset(15);
// make.right.equalTo(self.view).with.offset(-15);
make.top.equalTo(titleLabel.mas_bottom).with.offset(12);
make.width.mas_offset(downloadImage.size.width);
make.height.mas_offset(downloadImage.size.height);
make.bottom.equalTo(_myScrollView.mas_bottom).with.offset(-20);
}];
网友评论