Giter Club home page Giter Club logo

spring's Introduction

Spring - Animation

Swift

Features

  • Chained grammar.
  • No inheritance required.
  • Lightweight expansion.
  • Based on UIViewAnimation.
  • No code intrusion.

Installation

CocoaPods - Podfile

source 'https://github.com/lixiang1994/Specs'

pod 'Spring'

Carthage - Cartfile

github "lixiang1994/Spring"

Usage

First make sure to import the framework:

import SpringAnimation

Here are some usage examples. All devices are also available as simulators:

Chaining

 animationView.spring
  .opacity(0.1)
  .scale(0.8, 0.8)
  .duration(2)
  .curve(.easeOutQuad)
  .animate()

Functions

animate() { ... }

Animation

shake
pop
morph
squeeze
wobble
swing
flipX
flipY
fall
squeezeLeft
squeezeRight
squeezeDown
squeezeUp
slideLeft
slideRight
slideDown
slideUp
fadeIn
fadeOut
fadeInLeft
fadeInRight
fadeInDown
fadeInUp
zoomIn
zoomOut
flash

Curve

spring
linear
easeIn
easeOut
easeInOut

Properties

force
duration
delay
damping
velocity
repeatCount
scale
x
y
rotate

* Not all properties work together.

Reference

Spring

Contributing

If you have the need for a specific feature that you want implemented or if you experienced a bug, please open an issue. If you extended the functionality of Spring yourself and want others to use it too, please submit a pull request.

License

Spring is under MIT license. See the LICENSE file for more info.

spring's People

Contributors

lixiang1994 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.