zoukankan      html  css  js  c++  java
  • masonry

    UIView *myView = nil

    [self.window addSubview:myView];

    //使用之前要先将试图添加到俯视图上 然后再约束 

    [myView mas_makeConstraints:^(MASConstraintMaker *make){

      make.center.equalTo(self.window);

      make.size.mas_equalTo(CGSizeMake(300, 300));

    }];

    mas_makeConstraints 新增约束

    mas_updateConstraints 更新

    mas_remakeConstraints 移除

    mas_equalTo  :NSNumber CGPoint CGSize UIEdgeInsets

    [myView mas_makeConstraints:^(MASConstraintMaker *make){

      make.top.left.bottom.and.right.equalTo(self.window).with.insets(UIEdgeInsetsMake(10,10,10,10));

    }];

    [myView mas_makeConstraints:^(MASConstraintMaker *make){

      make.edges.equalTo(self.window).with.insets(UIEdgeInsetsMake(10,10,10,10));

    }];

    [myView mas_makeConstraints:^(MASConstraintMaker *make){

      make.top.equalTo(self.window).with.offset(15);

      make.left.equalTo(self.window).with.offset(15);

      make.bottom.equalTo(self.window).with.offset(-15);

      make.right.equalTo(self.window).with.offset(-15);

    }];

  • 相关阅读:
    mysql 取出每科成绩前两名
    mysql 数据库以及sql 的优化
    Twitter开源分布式自增ID算法snowflake
    SVN 冲突
    VUE 入门 1 列表、if判断 、双向绑定
    Roadblock
    最大子序和
    SOLDIERS
    绿豆蛙的归宿
    Place the Robots
  • 原文地址:https://www.cnblogs.com/dlwj/p/6624698.html
Copyright © 2011-2022 走看看