Skip to content

clg0118/CKWaveCollectionViewTransition

Repository files navigation

CKWaveCollectionViewTransition

This is a cool custom transition between two or more UICollectionViewControllers with wave like cell animation. Could be used in e.g. galleries.

anim.gif

Animation idea was taken from Łukasz FrankiewiczDribble project

Installation

There are two options:

  • Via CocoaPods.
  • Manually add the files into your Xcode project. Slightly simpler, but updates are also manual.

Usage

  • In storyboard add object in your NavigationController.

object.jpg

  • Set it's class to NavigationControllerDelegate

objectCustomClass.jpg

  • Set NavigationController delegate to this object.

navigationControllerDelegateObject.jpg

or

Implement UINavigationControllerDelegate in your ViewController:

func navigationController(navigationController:UINavigationController, animationControllerForOperation operation:UINavigationControllerOperation, fromViewController fromVC:UIViewController, toViewController toVC:UIViewController)->UIViewControllerAnimatedTransitioning?{letanimator=CKWaveCollectionViewAnimator()if operation !=UINavigationControllerOperation.Push { animator.reversed =true}return animator }

Properties

internalletanimationDuration:Double!=1.0

Total animation duration

internalletkCellAnimSmallDelta:Double!=0.01

Small delay between cell animations

internalletkCellAnimBigDelta:Double!=0.03

Big delay between cell animations

Requirements

  • iOS 7.0+

License

Released under the MIT license. See the LICENSE file for more info.

About

Cool wave like transition between two or more UICollectionView

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift97.8%
  • Ruby2.2%