美文网首页
UIScrollview

UIScrollview

作者: iOS白水 | 来源:发表于2017-12-27 17:42 被阅读0次

1.UIScrollview与Autolayout
make.bottom.mas_equalTo(self.contentScrollView); 主要是要计算出contentsize。

 UIView *bannerView=[[UIView alloc] init];
 
 [self.contentScrollView  addSubview:bannerView];
 
 [bannerView mas_makeConstraints:^(MASConstraintMaker *make) {
     
     make.left.mas_equalTo(self.contentScrollView);
     make.top.mas_equalTo(NAVBAR_HIGHT);
     make.width.mas_equalTo(self.contentScrollView);
     make.height.mas_equalTo(1000);
     make.bottom.mas_equalTo(self.contentScrollView);   //这个
     
 }];

相关文章

网友评论

      本文标题:UIScrollview

      本文链接:https://www.haomeiwen.com/subject/phaugxtx.html