美文网首页
mastory项目使用:

mastory项目使用:

作者: violafa | 来源:发表于2017-01-04 23:50 被阅读93次

参考网址:http://www.cocoachina.com/ios/20141219/10702.html  

mastory库下载===》 github地址:https://github.com/SnapKit/Masonry 

1.二等分:

UIView *vSales =[[UIView alloc]init];

[cell addSubview:vSales];

UIView *vIncompleteOrder =[[UIView alloc]init];

[cell addSubview:vIncompleteOrder];

[vSales mas_makeConstraints:^(MASConstraintMaker *make){

make.top.mas_equalTo(lbWithdrawMoney.mas_bottom).with.offset(20);

make.left.bottom.mas_equalTo(cell);

make.right.mas_equalTo(vIncompleteOrder.mas_left);

make.width.mas_equalTo(vIncompleteOrder);

}];

[vIncompleteOrder mas_makeConstraints:^(MASConstraintMaker *make){

make.top.mas_equalTo(lbWithdrawMoney.mas_bottom).with.offset(20);

make.left.mas_equalTo(vSales.mas_right);

make.right.bottom.mas_equalTo(cell);

make.width.mas_equalTo(vSales);

}];

1.三等分:

UIView *vToday =[[UIView alloc]init];

vToday.backgroundColor =[UIColor redColor];

[cell addSubview:vToday];

UIView *vSevenDay =[[UIView alloc]init];

vSevenDay.backgroundColor =[UIColor greenColor];

[cell addSubview:vSevenDay];

UIView *vCumulativeOrder =[[UIView alloc]init];

vCumulativeOrder.backgroundColor =[UIColor yellowColor];

[cell addSubview:vCumulativeOrder];

[vToday mas_makeConstraints:^(MASConstraintMaker *make){

make.top.mas_equalTo(vLine.mas_bottom);

make.left.bottom.mas_equalTo(cell);

make.width.mas_equalTo(cell.mas_width).dividedBy(3);

}];

[vSevenDay mas_makeConstraints:^(MASConstraintMaker *make){

make.top.bottom.width.mas_equalTo(vToday);

make.centerX.mas_equalTo(cell);

}];

[vCumulativeOrder mas_makeConstraints:^(MASConstraintMaker *make){

make.top.bottom.width.mas_equalTo(vToday);

make.right.mas_equalTo(cell);

}];

相关文章

  • mastory项目使用:

    参考网址:http://www.cocoachina.com/ios/20141219/10702.html m...

  • infer 项目静态分析

    使用infer进行项目静态分析 项目不使用.xcworkspace时使用,xxx为项目名,下同 infer -- ...

  • Redis共享数据时的异常

    多个项目同时使用一个redis,数据共享 依赖 项目a使用 项目b使用 状况 当项目a/b使用自己写入数据一切正常...

  • 小程序 组件:日历

    效果 导入使用 项目使用1、json文件引用 2、wxml使用 项目地址

  • Mvvm+Androidx+JectPack(LifeCycle

    项目github地址 项目简介 项目使用的是mvvm框架,使用了LifeCycle、ViewModel、LiveD...

  • 前端框架SUI踩坑

    重要的话说三遍: 不要使用阿里开源项目 不要使用阿里开源项目 不要使用阿里开源项目

  • 基于axios的HttpClient请求封装

    项目使用代码 个人封装 可直接复制粘贴使用。项目是基于react的 需结合自己项目使用框架进行适当修改。

  • Spring Boot Ebean集成

    项目使用 maven构建,使用Spring boot 1.5.7 + ebean +mysql user表: 项目...

  • 目录介绍

    这里使用 nest cli 创建项目,您将学会创建项目的目录介绍。 使用 nest cli建立项目 将创建项目目录...

  • kotlin协程使用笔记

    kotlin使用协程的准备工作 本人使用idea + maven构建项目,使用kotlin + 协程 + 编译项目...

网友评论

      本文标题:mastory项目使用:

      本文链接:https://www.haomeiwen.com/subject/wvvavttx.html