Cool wave like transition between two or more UICollectionView
Swift
1,843
25 commits
updated Oct 13, 2019
This is a cool custom transition between two or more UICollectionViewControllers with wave-like cell animation. Could be used in e.g. galleries.

Animation idea was taken from Łukasz Frankiewicz Dribble project
There are two options:



or
Implement UINavigationControllerDelegate in your ViewController:
func navigationController(navigationController: UINavigationController, animationControllerForOperation operation: UINavigationControllerOperation,
fromViewController fromVC: UIViewController, toViewController toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
let animator = CKWaveCollectionViewAnimator()
if operation != UINavigationControllerOperation.Push {
animator.reversed = true
}
return animator
}
override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
selectedIndexPath = indexPath
}
internal let animationDuration: Double! = 1.0
Total animation duration.
internal let kCellAnimSmallDelta: Double! = 0.01
internal let kCellAnimBigDelta: Double! = 0.03
Properties you can change to adjust animation.
Released under the MIT license. See the LICENSE file for more info.
35 followers · starred May 2016
275 followers · starred Jul 2015
1,338 followers · starred Aug 2015
331 followers · starred Aug 2015
Cool wave like transition between two or more UICollectionView
Swift
1,843
25 commits
updated Oct 13, 2019
This is a cool custom transition between two or more UICollectionViewControllers with wave-like cell animation. Could be used in e.g. galleries.

Animation idea was taken from Łukasz Frankiewicz Dribble project
There are two options:



or
Implement UINavigationControllerDelegate in your ViewController:
func navigationController(navigationController: UINavigationController, animationControllerForOperation operation: UINavigationControllerOperation,
fromViewController fromVC: UIViewController, toViewController toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
let animator = CKWaveCollectionViewAnimator()
if operation != UINavigationControllerOperation.Push {
animator.reversed = true
}
return animator
}
override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
selectedIndexPath = indexPath
}
internal let animationDuration: Double! = 1.0
Total animation duration.
internal let kCellAnimSmallDelta: Double! = 0.01
internal let kCellAnimBigDelta: Double! = 0.03
Properties you can change to adjust animation.
Released under the MIT license. See the LICENSE file for more info.
35 followers · starred May 2016
275 followers · starred Jul 2015
1,338 followers · starred Aug 2015
331 followers · starred Aug 2015