Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zekunyan/autolayoutexamplewithmasonry
Different Autolayout examples with Masonry. 用Masonry写的Autolayout案例,持续更新中。详细解答请看tutuge.me
https://github.com/zekunyan/autolayoutexamplewithmasonry
animation autolayout demo ios objective-c uitableviewcell
Last synced: about 2 hours ago
JSON representation
Different Autolayout examples with Masonry. 用Masonry写的Autolayout案例,持续更新中。详细解答请看tutuge.me
- Host: GitHub
- URL: https://github.com/zekunyan/autolayoutexamplewithmasonry
- Owner: zekunyan
- Created: 2015-05-23T12:24:17.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-05-08T06:37:30.000Z (over 6 years ago)
- Last Synced: 2024-05-01T14:38:16.068Z (7 months ago)
- Topics: animation, autolayout, demo, ios, objective-c, uitableviewcell
- Language: Objective-C
- Homepage: http://tutuge.me
- Size: 1.08 MB
- Stars: 704
- Watchers: 23
- Forks: 146
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Autolayout Example With Masonry
用Masonry实现的Autolayout示例。[![Build Status](https://travis-ci.org/zekunyan/AutolayoutExampleWithMasonry.svg?branch=master)](https://travis-ci.org/zekunyan/AutolayoutExampleWithMasonry)
![目录](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/demo_screenshot.png)
## 博客
[有趣的Autolayout示例-Masonry实现](http://tutuge.me/2015/05/23/autolayout-example-with-masonry/)
讲解了Case1到Case3[有趣的Autolayout示例2-Masonry实现](http://tutuge.me/2015/08/08/autolayout-example-with-masonry2/)
讲解了Case4到Case6[有趣的Autolayout示例3-Masonry实现](http://tutuge.me/2015/12/14/autolayout-example-with-masonry3/)
讲解了Case7到Case9[有趣的Autolayout示例4-Masonry实现](http://tutuge.me/2016/08/06/autolayout-example-with-masonry4/)
讲解了Case10到Case12[有趣的Autolayout示例5-Masonry实现](http://tutuge.me/2017/03/12/autolayout-example-with-masonry5/)
讲解了Case13到Case15### Case1: 并排两个label,宽度由内容决定。父级View宽度不够时,优先显示左边label的内容
![](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/case1.png)
### Case2: 四个ImageView整体居中,可以任意显示、隐藏
![](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/case2.png)
### Case3: 子View的宽度始终是父级View的一半(或者任意百分比)
![](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/case3.png)
### Case4: 动态高度UITableViewCell,附加简单的高度缓存
![](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/case4.png)
### Case5: topLayoutGuide和bottomLayoutGuide使用案例
![](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/case5.png)
### Case6: 自定义baseline效果
![](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/case6.png)
### Case7: 给UITableView加上简单的Parallax视差效果Header
![](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/case7.png)
### Case8: 实时改变UITableViewCell的高度
![](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/case8.png)
### Case9: 等间距View
![](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/case9.png)
### Case10: 用约束优先级保证可移动View的内容可见性
![](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/case10.png)
### Case11: Autolayout的约束=控件间位置关系的“绑定”
![](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/case11.png)
### Case12: 利用`layoutIfNeeded`控制约束的生效时机
![](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/case12.png)
### Case13:Cell中并排多个变高Label
![](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/case13.png)
### Case14: 自定义View的intrinsicContentSize,并支持在UITableViewCell中自动计算高度
![](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/case14.png)
### Case15: 同一个属性可以添加多重约束
![](https://github.com/zekunyan/AutolayoutExampleWithMasonry/raw/master/Resources/case15.png)