MengTo/Spring
MengTo/Spring has 14,054 GitHub stars and 1,801 forks. GitHot measured -1 stars in 24 hours, 0 in 7 days, and -2 in 15 days. Last checked 2026-11-21 10:55 UTC. Last push 2023-07-03.
측정된 스타 증가
- in 24h
- -1
- in 7 days
- 0
- in 15 days
- -2
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
소개
Swift에서 iOS 애니메이션을 간소화하는 라이브러리입니다.
창작 및 미디어README.md
OriginalUpdated for Swift 4.2
Requires Xcode 10 and Swift 4.2.
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'
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
- Tutorials available on Design+Code.
- Integrate Spring to existing Objective-C projects
ChangeLog
- At ChangeLog wiki page
License
Spring is released under the MIT license. See LICENSE for details.
관련 프로젝트 살펴보기
불러오는 중…