UIScrollview

2017-12-27  本文已影响0人  iOS白水

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

上一篇 下一篇

猜你喜欢

热点阅读