core animation 是在UIKit层之下的一个图形库,用于在iOS 和 OS X 实现动画。

Core Animation管理App内容

  core animation不是一个完整的绘图系统,它是将App内容合成、操纵并应用于硬件的一个基础框架。

  他的核心是Layer对象,大多情况,layer被用来管理view的内容,不过我们仍然可以创建独立的layer。

 Layer 修改触发动画

  layer类似于view,有一些属性可以修改:bounds rectangle, a position onscreen, an opacity, a transform, and many other visually-oriented properties。

Layer可以被组织划分层次

  layer的层次类似于view的层次,有parent-child的关系。

Action 使我们可以改变Layer的默认特性

  隐式动画由action完成,core animation使用action实现layer相关的动画集合。action也可以自定义。


为Layer设置内容

  1.给layer对象的contents属性直接赋值为image对象。(这种方式适合那种永远或者很少变动的layer 内容)

  2.给layer指定一个delegate,由delegate绘制layer的内容。(这种方式适合那种有周期变动的layer的内容,或者使用其他对象提供给layer content的)

  3.定义一个layer的子类,并且复写绘制方法,从而创建内容。(这种方式适合你必须要子类化layer,或者你想改变layer的基本绘制机制)


CABasicAnimation :基本动画
CAKeyframeAnimation :关键帧动画
CATransitionAnimation :变换动画

model layer 和 presenttation layer

Core Animation 维护了两个平行 layer 层次结构:
 1.model layer tree(模型层树) 
 2.presentation layer tree(表示层树) 关于postion、anchorpoint的一个文章,不错:
http://wonderffee.github.io/blog/2013/10/13/understand-anchorpoint-and-position/


fromValue toValue byValue 1.fromValue toValue都不为nil,改变将会是从fromValue->toValue
2.fromValue byValue都不为nil,改变将会是从fromValue->(fromValue+byValue)
3.byValue toValue不为nil,改变将会是从(toValue-byValue)->toValue
4.fromValue不为nil,改变将会是从fromValue->当前展示位置的value
5.toValue不为nil,改变将会是从当前展示的value->toValue
6.byValue不为nil,改变将是会从当前展示的value->当前展示的value+byValue
7.fromValue toValue byValue都为nil,改变是从之前的value->当前设置的value

CATransform3D 

参考:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html
http://zsisme.gitbooks.io/ios-/content/index.html
http://objccn.io/issue-12-1/  
http://blog.sina.com.cn/s/blog_a5243c7f0102v17c.html

Core Animation 学习的更多相关文章

  1. Core Animation学习总结

    文件夹: The Layer Beneath The Layer Tree(图层树) The Backing Image(寄宿层) Layer Geometry(图层几何学) Visual Effec ...

  2. iOS Core Animation学习总结(1)--CALayer常用属性

    图层是core animation的基础, UIView之所以能显示在屏幕上,靠的是其内部的这个图层,即每个UIView 都有 CALayer,可通过UIView.layer或者[UIView lay ...

  3. Instruments学习之Core Animation学习

    当App发展到一定的规模,性能优化就成为必不可少的一点.但是很多人,又对性能优化很陌生,毕竟平常大多时间都在写业务逻辑,很少关注这个.最近在优化自己的项目,也收集了很多资料,这里先浅谈一下使用Inst ...

  4. iOS Core Animation学习总结(3)--动画的基本类型

    一. CABasicAnimation (基础动画) 移位: CABasicAnimation *animation = [CABasicAnimation animation]; //keyPath ...

  5. iOS Core Animation学习总结(2)--实现自定义图层

    一. 创建图层继承于CALayer,并在子类实现drawInContext方法 @interface CTLayer : CALayer @end @implementation CTLayer -( ...

  6. 转 iOS Core Animation 动画 入门学习(一)基础

    iOS Core Animation 动画 入门学习(一)基础 reference:https://developer.apple.com/library/ios/documentation/Coco ...

  7. iOS Core Animation 动画 入门学习(一)基础

    reference:https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreAnimation_guide ...

  8. IOS Core Animation Advanced Techniques的学习笔记(五)

    第六章:Specialized Layers   类别 用途 CAEmitterLayer 用于实现基于Core Animation粒子发射系统.发射器层对象控制粒子的生成和起源 CAGradient ...

  9. IOS Core Animation Advanced Techniques的学习笔记(四)

    第五章:Transforms   Affine Transforms   CGAffineTransform是二维的     Creating a CGAffineTransform   主要有三种变 ...

随机推荐

  1. iOS-APP发布应注意要点

    Android和IOS的app发布的流程有一个相同之处,就是都需要先将编译好的app签名,然后上传到market里,但两者的复杂度是冰火两重天.Android可以手动通过集成在eclipse里的工具进 ...

  2. Spring MVC 文件上传下载

    本文基于Spring MVC 注解,让Spring跑起来. (1) 导入jar包:ant.jar.commons-fileupload.jar.connom-io.jar. (2) 在src/cont ...

  3. javascript设计模式与开发实践阅读笔记(7)——迭代器模式

    迭代器模式:指提供一种方法顺序访问一个聚合对象中的各个元素,而又不需要暴露该对象的内部表示. 迭代器模式可以把迭代的过程从业务逻辑中分离出来,在使用迭代器模式之后,即使不关心对象的内部构造,也可以按顺 ...

  4. JQ中 trigger()和triggerHandler()区别

    既然使用了trigger和triggerHandler,那么你应该了解了他们的差别了. trigger():在每一个匹配的元素上触发某类事件. triggerHandler():这个特别的方法将会触发 ...

  5. AndroidStudio使用第三方jar包报错(Error: duplicate files during packaging of APK)

    http://www.kwstu.com/ArticleView/android_201410252131196692 错误描述: Error: duplicate files during pack ...

  6. NEWS - InstallShield 2014正式发布

    InstallShield又迎来了新的版本InstallShield 2014,开发版本号Ver 21.0,相关产品信息已经可以从厂商Flexera Software(富莱睿)官方网站获得. 对于中国 ...

  7. 翻译:微软style的并行计算

    Parallel Microsoft-Style By Andrew Binstock, July 20, 2011 Note:主要是自动翻译,俺做了小量修改 1 Comment The actor ...

  8. 通过Web.config实现301重定向

    通过Web.config实现301重定向 IIS7以上可以通过修改Web.config实现IIS设置 现在我们通过Web.config实现301重定向 <system.webServer> ...

  9. phpStorm无法使用svn1.8的解决办法

    1.安装SVN的Command Lines Tools. 2.在phpStorm的SVN属性中,将Use Command Line Client填入:C:\Program Files\Tortoise ...

  10. goldengate一些参数整理

    转自:http://blog.csdn.net/lemontree1123/article/details/46603549 manager参数: AUTOSTART:指定在mgr启动时自动启动那些进 ...