ReplaceAnimation

Pull-to-refresh animation in UICollectionView with a sticky header flow layout, written in Swift :large_orange_diamond:

  • Owner: fruitcoder/ReplaceAnimation
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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

Cancelling Refresh Animation

alt tag

Scrolling

alt tag

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 for more info.

Main metrics

Overview
Name With Ownerfruitcoder/ReplaceAnimation
Primary LanguageSwift
Program languageSwift (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2016-03-11 00:37:59
Pushed At2020-11-13 14:38:24
Last Commit At2020-11-13 15:38:19
Release Count0
用户参与
Stargazers Count0.9k
Watchers Count17
Fork Count91
Commits Count22
Has Issues Enabled
Issues Count5
Issue Open Count4
Pull Requests Count5
Pull Requests Open Count1
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private