Giter Site home page Giter Site logo

iosanimationtutorial's Introduction

iOSAnimation

以前写了很多动效,不过没有系统的整理一下,最近正在准备动画相关的课程,刚好趁这个机会收集以前写的零零散散的效果。现在主要是集中在了BasicAnimation这块。后续会慢慢完善。

CAAnimation

view层的动画就不多说了。网上相关的例子很多。主要讲讲Layer层的动画。
先来说下CAAnimation的优点。

  • 可交互性
    • UIViewAnimation执行的时候无法响应时间,这个应该大家都知道。所以涉及到可交互动画的时候一般都使用的是CAAnimation
  • 可以pause,resume。
    • 可以随时暂停,继续动画。这个UIViewAnimation应该也是做不到的
  • 实现的效果多样。
    • 认真挖掘的话,可以玩的花样非常非常多,相比较而言,UIViewAnimation能够实现的效果就比较单一了。
      总结完了,我们来深入了解一下。

第一部分CABasicAnimation

先看初始化方法。
[CABasicAnimation animationWithKeyPath:keyPath]; 苹果官方文档有这么一段。

其实只要是这些属性,都可以当做keypath来进行动画。

Demo里的动画有这些。

iosanimationtutorial's People

Contributors

zangqilong198812 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.