Requires Xcode 13 and Swift 5.6
To see all possible animations and curves in action download the SpringApp application: https://github.com/LexDeBash/SpringApp.git
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":
In Identity Inspector, connect the UIView to SpringView Class and set the animation properties in Attribute Inspector.
springView.animation = "squeezeDown"
springView.animate()
springView.y = -50
animateToNext {
springView.animation = "fall"
springView.animateTo()
}
animate()
animateNext { ... }
animateTo()
animateToNext { ... }
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
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
autostart
autohide
title
curve
force
delay
duration
damping
velocity
repeatCount
x
y
scaleX
scaleY
scale
rotate
Allows you to animate without code. Don't need to use this if you plan to start the animation in code.
Saves you the hassle of adding a line springView.alpha = 0
in viewDidLoad().