Masonry 快速修炼手册,带你打怪升级

OC 版 Masonry 技能塔,带你用 Masonry 打怪升级 ?

由浅入深的教你使用 Masonry 进行相对布局。

? 要求

  • iOS 8.0+
  • Xcode 7.0+
  • Objective-C

? 测试 UI 什么样子?

1.列表页2.基本布局页3.相应监听页4.更新列表页5.九宫格页
通过 storyboard 搭建基本框架基本的相对布局根据键盘高度相应布局根据网络数据自适应高度布局九宫格相对布局

? 安装方法

安装

1.手动安装:

下载Demo后,将功能文件夹拖入到项目中, 导入头文件后开始使用。

2.CocoaPods安装:

修改“Podfile”文件

pod 'Masonry', '~> 1.0.2'
复制代码

控制台执行 Pods 安装命令 ( 简化安装:pod install --no-repo-update )

pod install
复制代码

如果 pod search 发现不是最新版本,在终端执行pod setup命令更新本地spec镜像缓存,重新搜索就OK了

? 配置

开始学习

去打怪升级吧~

注:做的比较早,所以只提供初级入门示例,没有注意 Masonry 更新时机等问题,懒得优化了..

如果觉得力有不逮,就充一毛,又不是真找你要钱,给个 Stat 就好了✨

? 深入学习

这里只是基础教学,使用并不规范,如果想要深入学习,可以前往GitHub-SnapKit主页!(https://github.com/SnapKit)

OC Masonry:https://github.com/SnapKit/Masonry

Swift SnapKit:https://github.com/SnapKit/SnapKit

⚖ 协议

MIT License

Copyright (c) 2017 ReverseScale

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
复制代码

? 联系

  • 微信 : WhatsXie
  • 邮件 : ReverseScale@iCloud.com
  • 博客 : https://reversescale.github.io
  • 源码 : https://github.com/ReverseScale/RSMasonryDemo

EN

OC Masonry skill tower, take you to upgrade with Masonry Daguai ?

Shallow teach you to use Masonry relative layout.

? Requirements

  • iOS 8.0+
  • Xcode 7.0+
  • Objective-C

? Why test the UI?

1.List Page2.Basic Layout Page3.Monitor Page4.Update List Page5.Jiugongge Page
Basic framework through storyboardBasic relative layoutCorresponding layout according to keyboard heightAdaptive height layout based on network dataRelative layout of Jiugongge

? Installation

Install

1. Manual installation:

After downloading the Demo, drag the function folder into the project and start using the header file.

2.CocoaPods installation:

Modify "Podfile" file

pod 'Masonry', '~> 1.0.2'
复制代码

Console Execute Pods Installation Command (Simplified Installation: pod install --no-repo-update)

pod install
复制代码

If the pod search found is not the latest version, the terminal pod setup command to update the local spec image cache, search again OK

? Configuration

Start learning

Go to Daguai to upgrade it ~

If you feel that you have enough power, you will find it hard to find a Stat

? Submission

Here is just basic teaching, not standardized, if you want further study, you can go to GitHub-SnapKit home page!(https://github.com/SnapKit)

OC Masonry:https://github.com/SnapKit/Masonry

Swift SnapKit:https://github.com/SnapKit/SnapKit

⚖ License

MIT License

Copyright (c) 2017 ReverseScale

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
复制代码

? Contributions

  • WeChat : WhatsXie
  • Email : ReverseScale@iCloud.com
  • Blog : https://reversescale.github.io
  • Code : https://github.com/ReverseScale/RSMasonryDemo
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值