https://github.com/bannzai/coreanimator
Easily way to bridge UIView animation and CoreAnimation
https://github.com/bannzai/coreanimator
Last synced: 10 months ago
JSON representation
Easily way to bridge UIView animation and CoreAnimation
- Host: GitHub
- URL: https://github.com/bannzai/coreanimator
- Owner: bannzai
- Created: 2017-08-19T03:18:20.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-12T17:56:42.000Z (over 8 years ago)
- Last Synced: 2025-08-30T01:33:32.607Z (10 months ago)
- Language: Swift
- Homepage:
- Size: 4.92 MB
- Stars: 26
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CoreAnimator
Easily way to bridge UIView animation and CoreAnimation
## Usage
Currently only sequence animation support.
```swift
SequenceAnimator()
.add(duration: 1, view: redView) {
// Execute `animate()` as a trigger
$0.alpha = 1
}
.add(duration: 2, view: blueView) {
// Run after 1 second.
$0.frame.origin = .zero
}
// Run after UIView animations
.add(
duration: 1,
layer: yellowView.layer,
options: .easeInOut,
keyPath: KeyPathValue.cornerRadius.self,
fromValue: 0,
toValue: 20
)
.addCompletion {
// Calling when all animation end.
print("end")
}
.animate()
```
## TODO
- [ ] Support Parallel
- [ ] Support Cocoapods
- [ ] Support Carthage
- [ ] Write Unit test.
## License
CoreAnimator is available under the MIT license. See the LICENSE file for more info.