Spring 1.0.3

Spring 1.0.3

DocsDocumented
TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Apr 2015
SPMSupports SPM

Maintained by James Tang, Meng To, André Schneider.


Downloads

Total337,502
Week7,061
Month26,037

Installs

Apps10,533
Apps WeekApps This Week 801
Test Targets714
Test WeekTests This week 66
Watch Apps2
powered by Segment

GitHub

Stars10,150
Watchers447
Forks1,086
Issues89
Contributors21
Pull Requests20

Code

Files27
SizeIntegration Size 420 kb
FrameworkCreates Framework
LOCLines of Code 1,548


Spring 1.0.3

  • By
  • Meng To

Installation

Drop in the Spring folder to your Xcode project.

Or via CocoaPods: pod 'Spring', '~> 1.0.3'

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

Animations using IBInspectables are currently not working in iOS 7. iOS 8 is supported. We're looking for a fix. Animations in code works for both iOS 7 and 8.

This project now requires Xcode 6.3 and Swift 1.2. For old version please download 1.0.2

Tutorials

ChangeLog

License

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