zoukankan      html  css  js  c++  java
  • Masonry

    Masonry

    • 更新约束
    • 以下方法都仅仅是为了提高可读性,可有可无
    - (MASConstraint *)with {
        return self;
    }
    
    - (MASConstraint *)and {
        return self;
    }
    [blueView updateConstraints:^(MASContraintMaker *make){
    //新的约束
    //宽和高都是100
    make.width.height.equalTo(100);
    //With并没有什么作用
    mak.left.equalTo(slef.view).with.with.with.offset(20);
    }];
    • 默认情况下,mas_equalTo有自动包装功能,比如自动将20包装为@20,equalTo没有自动包装功能
    • 如果添加了下面的宏,那么mas_equalTo和equalTo就没有区别
    #define MAS_SHORTHAND_GLOBALS
    // 注意:这个宏一定要添加到#import "Masonry.h"前面
    • 默认情况下,width是make对象的一个属性,用来添加宽度约束用的,表示对宽度进行约束
    • mas_width是一个属性值,用来当做equalTo的参数,表示某个控件的宽度属性
    • 如果添加了下面的宏,mas_width也可以写成width
    #define MAS_SHORTHAND
    • 注意: mas_height、mas_centerX以此类推
  • 相关阅读:
    负外边距--转载
    研究Dropbox Server端文件系统
    Bluetooth Profile for iPhone from the functional perspectives
    Somebody That I Used to Know
    复合查询
    聚合查询
    Filter查询
    ES基本查询
    ES版本控制
    ES基本操作
  • 原文地址:https://www.cnblogs.com/HMJ-29/p/4758685.html
Copyright © 2011-2022 走看看