Coder Social home page Coder Social logo

chenyihu / caanimation-easingequations Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bryanoltman/caanimation-easingequations

0.0 2.0 0.0 84 KB

A category on CAAnimation that provides a number of easing equations to add some zazz to your app (with examples!)

caanimation-easingequations's Introduction

CAAnimation-EasingEquations

A category on CAAnimation that provides a number of easing equations to add some zazz to your app (with examples!)

To use

  • Link your build target with QuartzCore
    • Select your project in Xcode's project navigator
    • Select your project's target
    • Navigate to "Build Phases"
    • In the "Link Binary with Libraries" section, click the '+' button
    • Select QuartzCore and click "Add"
  • Add CAAnimation+EasingEquations.h and CAAnimation+EasingEquations.m to your project
  • Enjoy!

Because this uses CoreAnimation, animations are applied to CALayer objects. For example, if we wanted a UIView to become completely transparent over the course of a second, the code to do that would look like this:

    [CAAnimation addAnimationToLayer:animatedView.layer
                         withKeyPath:@"opacity"
                            duration:1
                                  to:0
                      easingFunction:CAAnimationEasingFuctionEaseInBounce];

In this example, the bounce ease-in function would be used.

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.