SpringAnimation
No description available
Install / Use
/learn @LexDeBash/SpringAnimationREADME
SpringAnimation
Requirements
Requires Xcode 13 and Swift 5.6
SpringApp
To see all possible animations and curves in action download the SpringApp application: https://github.com/LexDeBash/SpringApp.git
Installation
Swift Package Manager
Copy framework url to clipboard:

Open your project in Xcode and go to the "Frameworks, Libraries and Embedded Content" section in the general project settings, then click on the add new library button:

Then select "Add Other..." -> "Add Package Dependency...":

In the window that opens, go to the search bar and paste the url https://github.com/LexDeBash/SpringAnimation.git
Then press the button "Add Package":

In the package selection window, check the SptingAnimation and press "Add Package":

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

Usage with Code
springView.animation = "squeezeDown"
springView.animate()
Chaining Animations
springView.y = -50
animateToNext {
springView.animation = "fall"
springView.animateTo()
}
Functions
animate()
animateNext { ... }
animateTo()
animateToNext { ... }
Animations
pop
slideLeft
slideRight
slideDown
slideUp
squeezeLeft
squeezeRight
squeezeDown
squeezeUp
fadeIn
fadeOut
fadeOutIn
fadeInLeft
fadeInRight
fadeInDown
fadeInUp
zoomIn
zoomOut
fall
shake
flipX
flipY
morph
squeeze
flash
wobble
swing
Curves
easeIn
easeOut
easeInOut
linear
spring
easeInSine
easeOutSine
easeInOutSine
easeInQuad
easeOutQuad
easeInOutQuad
easeInCubic
easeOutCubic
easeInOutCubic
easeInQuart
easeOutQuart
easeInOutQuart
easeInQuint
easeOutQuint
easeInOutQuint
easeInExpo
easeOutExpo
easeInOutExpo
easeInCirc
easeOutCirc
easeInOutCirc
easeInBack
easeOutBack
easeInOutBack
Properties
autostart
autohide
title
curve
force
delay
duration
damping
velocity
repeatCount
x
y
scaleX
scaleY
scale
rotate
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 springView.alpha = 0 in viewDidLoad().
