Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fruitcoder/ReplaceAnimation
Pull-to-refresh animation in UICollectionView with a sticky header flow layout, written in Swift :large_orange_diamond:
https://github.com/fruitcoder/ReplaceAnimation
Last synced: 6 days ago
JSON representation
Pull-to-refresh animation in UICollectionView with a sticky header flow layout, written in Swift :large_orange_diamond:
- Host: GitHub
- URL: https://github.com/fruitcoder/ReplaceAnimation
- Owner: fruitcoder
- License: mit
- Created: 2016-03-11T00:37:59.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-11-13T14:38:24.000Z (about 4 years ago)
- Last Synced: 2024-08-16T04:31:31.794Z (4 months ago)
- Language: Swift
- Homepage:
- Size: 36.6 MB
- Stars: 947
- Watchers: 18
- Forks: 89
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - ReplaceAnimation - Pull-to-refresh animation in UICollectionView with a sticky header flow layout, written in Swift (UI / Pull to Refresh)
- awesome-ios-star - ReplaceAnimation - Pull-to-refresh animation in UICollectionView with a sticky header flow layout, written in Swift (UI / Pull to Refresh)
README
# ReplaceAnimation
Implementation of Zee Young's Dribbble animation (https://dribbble.com/shots/2067564-Replace)# Info
I really liked Zee Young's animation so I gave it a shot on iOS. Since I wanted to learn some things that I didn't have the chance to get my hands on lately, I tried using constraints to achieve the parallax effect, use CAShapeLayers for the trees and translate the content offset to the bending. Every button and view should be rendered on the device so I could lay them out in a .xib.It's basically a `UICollectionView` with a sticky header flow layout (this one is based on https://github.com/Blackjacx/StickyHeaderFlowLayout) and all the parallax effects happen in `applyLayoutAttributes:`.
I added some jokes from "http://tambal.azurewebsites.net/joke/random" just so it's a little more interesting :)
## Refreshing
![alt tag](RefreshSuccess.gif)## Cancelling Refresh Animation
![alt tag](RefreshCancel.gif)## Scrolling
![alt tag](Scrolling.gif)# Contribution
Any contribution is welcome. Just submit a pull request.# Questions?
If you have any questions about why or how I solved certain things or the code doesn't make sense to you, just write me a message on Twitter.# License
Available under MIT license. See the [LICENSE](https://github.com/fruitcoder/ReplaceAnimation/blob/master/LICENSE) for more info.