zoukankan      html  css  js  c++  java
  • IOS Masonry+UIScrollView出现的问题

    问题:UIScrollView上有子视图超出界面外需要滑动全面预览

    解决方法:scrollView的最后一个子控件要加上 make.bottom.equalTo(scrollView.mas_bottom);

    [self addSubview:self.scrollView];
    ...
    [self.scrollView addSubview:self.botomView];
    //
    [self.scrollView mas_makeConstraints:^(MASConstraintMaker *make) {
               make.top.left.right.equalTo(self);
               make.bottom.equalTo(self);
        }];
    ...
    //botomView为最后一个字控件
    self.botomView.backgroundColor = [UIColor redColor]; [self.botomView mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.equalTo(self.scrollView); make.top.equalTo(self.radarChartView.mas_bottom); make.left.equalTo(self.scrollView.mas_left).offset(50); make.height.mas_equalTo(200); make.bottom.equalTo(self.scrollView.mas_bottom).offset(-20); }];

     以上为示例

    参考网址:https://www.jianshu.com/p/d18140eb2251

  • 相关阅读:
    java中的异常类
    Mysql--JDBC的基础
    eclipse使用断言
    idea中使用断言
    java的null
    array,集合(collection),集合(list)的区别
    命名管道FIFO
    标准库中的管道操作
    现代进程间的通信方式--管道
    广播编程之发送者
  • 原文地址:https://www.cnblogs.com/wusang/p/12809558.html
Copyright © 2011-2022 走看看