IOS----Core Animation介绍2
来源:互联网 发布:php快递查询源码 编辑:程序博客网 时间:2024/06/05 19:58
http://superman474.blog.163.com/blog/static/12066146201185755254/
Layer-Tree 结构
虽然layer的直接责任是提供可视的内容和管理动画,但是layer还作为其他layers的容器,创建一个layer结构。此篇就主要讲述layer的结构层次,以及我们如何在这结构层次中操纵layers。
1.core animation中的layer-tree和cocoa view的hierarchy相似。就像是UIView实例有superview和subviews一样,一个core Animation layer也有superlayer和sublayers。layer-tree提供了很多好处:
2.在views上显示layers
3.在结构层次中添加和移除layers
4.重定位(repositioning)或者调整(resizing)layers
自动调整layers
上图是对于mac ox下面的坐标,ios下面的稍微不同。
一个CALayer的子类可以覆盖resizeSublayersWithOldSize:和resizeWithOldSuperlayerSize:去自定义layer的autoresizeing行为。当一个layer的bounds属性改变时,resizeSublayersWithOldSize:方法会被自动的调用,并给每一个sublayer发送resizeWithOldSuperlayerSize:消息。
和UIView一样, 属性缺省为NO。
masksToBounds
- IOS----Core Animation介绍2
- IOS----Core Animation介绍2
- IOS----Core Animation介绍2
- IOS----Core Animation介绍1
- IOS----Core Animation介绍3
- IOS----Core Animation介绍4
- IOS----Core Animation介绍5
- IOS----Core Animation介绍3
- IOS----Core Animation介绍1
- IOS----Core Animation介绍3
- IOS----Core Animation介绍4
- IOS----Core Animation介绍5
- iOS开发有关Core Animation的介绍
- Core Animation介绍1
- Core Animation基础介绍
- Core Animation基础介绍
- iOS-Core-Animation-Advanced-Techniques(七-2)
- IOS开发—Core Animation核心动画介绍
- UIImageView.h
- 素食的好处
- diff比较两个目录时,如何略过特定目录或文件
- IOS----Core Animation介绍1
- 教你配置浏览器的苹果绿背景-保护您的眼睛
- IOS----Core Animation介绍2
- IOS----Core Animation介绍3
- $inc计数器
- IOS----Core Animation介绍4
- EDBC居然被顶到Hacker News的首页!
- IOS----Core Animation介绍5
- VC6的watch窗口的一些小技巧
- 浅谈程序员创业
- Linux chmod命令详解