UIScrollview

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);   //这个
     
 }];

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容