zoukankan      html  css  js  c++  java
  • AutoLayout--masonry使用

        [label1 mas_makeConstraints:^(MASConstraintMaker *make) {

            //使左边间距为

            make.left.equalTo(self.view.mas_left).offset(11);

            //顶部间距

            make.top.equalTo(self.view.mas_top).offset(70);

            //高度

            make.height.equalTo(30);

        }];

        

        [label2 mas_makeConstraints:^(MASConstraintMaker *make) {

            //使宽高等于label1

            make.width.and.height.equalTo(label1);

            //与label1顶部对齐

            make.top.equalTo(label1.mas_top);

            //与label1的间距为0

            make.leading.equalTo(label1.mas_trailing).offset(10);

        }];

        [label3 mas_makeConstraints:^(MASConstraintMaker *make) {

            //使宽高等于label2

            make.width.and.height.equalTo(label2);

            //与label2顶部对齐

            make.top.equalTo(label2.mas_top);

            //与label2的间距为0

            make.leading.equalTo(label2.mas_trailing).offset(10);

            //与父视图右边约束

            make.right.equalTo(self.view.mas_right).offset(-11);

        }];

     

     

     

     

     

     

     

    博客 http://ios.jobbole.com/83384/

  • 相关阅读:
    CF528D Fuzzy Search
    P3489 付公主的背包
    有标号的DAG计数
    P4609 [FJOI2016]建筑师
    mds/journal.cc: 2929: FAILED assert解决
    Ceph根据Crush位置读取数据
    关于backfill参数建议
    rados put striper功能的调试
    Cephfs的文件存到哪里了
    为什么删除的Ceph对象还能get
  • 原文地址:https://www.cnblogs.com/starainDou/p/5191855.html
Copyright © 2011-2022 走看看