Spring 0,4,13,11,0,14,0,19 CocoaPods

A library to simplify iOS animations in Swift.

Updated for Swift 3.0

Requires Xcode 8 and Swift 3.

Installation

Drop in the Spring folder to your Xcode project (make sure to enable “Copy items if needed” and “Create groups”).

Or via CocoaPods:

use_frameworks!
pod 'Spring', :git => 'https://github.com/MengTo/Spring.git', :branch => 'swift3'

Usage with Storyboard

In Identity Inspector, connect the UIView to SpringView Class and set the animation properties in Attribute Inspector.

Usage with Code

layer.animation = "squeezeDown"
layer.animate()

Demo The Animations

Chaining Animations

layer.y = -50
animateToNext {
  layer.animation = "fall"
  layer.animateTo()
}

Functions

animate()
animateNext { ... }
animateTo()
animateToNext { ... }

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. Play with the demo app.

Autostart

Allows you to animate without code. Don’t need to use this if you plan to start the animation in code.

Autohide

Saves you the hassle of adding a line “layer.alpha = 0” in viewDidLoad().

Known issue

Animations won’t autostart when view is reached via performSegueWithIdentifier.

Tutorials

ChangeLog

License

Spring is released under the MIT license. See LICENSE for details.

Related Repositories

Spring-Boot-Reference-Guide

Spring-Boot-Reference-Guide

Spring Boot Reference Guide中文翻译 -《Spring Boot参考指南》 ...

tut-spring-security-and-angular-js

tut-spring-security-and-angular-js

Spring Security and Angular JS:: A tutorial on how to use Spring Security with a single page application with various backend architectures, ranging from a simple single server to an API gateway with OAuth2 authentication. ...

spring-fu

spring-fu

Spring Fu is an incubator for new Spring features about Kotlin and functional bean registration. It introduces Kofu and Jafu configuration for configuring Spring Boot in a functional way, Coroutines support, GraalVM native images support and various other ...

spring-batch

spring-batch

Spring Batch is a framework for writing offline and batch applications using Spring and Java ...

spring-framework-4-reference

spring-framework-4-reference

Chinese translation of the Spring Framework 4.x Reference Documentation (http://docs.spring.io/spring/docs/current/spring-framework-reference/htmlsingle/) .中文翻译《Spring Framework 4.x参考文档》 ...


Top Contributors

MengTo jamztang schneiderandre RishabhTayal rastersize giacomopiva imkevinxu 0oneo brandonminch attilaszasz rcgary monotonique jaisonv nolanw PGLongo ricardopereira sammygutierrez Jasdev naoyashiga

Releases

-   1.0.3 zip tar
-   1.0.3-swift2 zip tar
-   1.0.2 zip tar
-   1.0.1 zip tar
-   1.0.0 zip tar