UIScrollView自适应高度

 UIScrollView *scrollView = [[UIScrollView alloc]init];

    scrollView.showsHorizontalScrollIndicator=NO;
    scrollView.showsVerticalScrollIndicator = NO;
    [self addSubview:scrollView];
    [scrollView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.bottom.mas_equalTo(0);
        make.width.mas_equalTo(Screen_Width);
    }];
    UIView *contentView = [[UIView alloc]init];
    [scrollView addSubview:contentView];
    [contentView mas_makeConstraints:^(MASConstraintMaker *make) {
       make.left.top.bottom.mas_equalTo(0);
        make.width.mas_equalTo(Screen_Width);
        
    }];

 [contentView mas_updateConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(groupLabel).offset(90*kSCALE_6S);
    }];


版权声明:本文为zhao15127334470原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。