Skip to content
A UICollectionViewLayout subclass that adds custom transitions/animations to the UICollectionView without effecting your existing code.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
AnimatedCollectionViewLayout.xcodeproj Updated to support Xcode 10.2 and Swift 5. Mar 27, 2019
AnimatedCollectionViewLayout.xcworkspace Updated for Xcode 10 with Swift 4.2. Sep 19, 2018
Source Merge pull request #34 from Voxar/master Nov 30, 2018
Tests Added the uri of AnimatedCollectionViewLayout Apr 7, 2017
iOS Example
.swift-version Updated related files to support Swift 5 and Xcode 10.2. Mar 27, 2019
.travis.yml Fixed travis destination option. Mar 27, 2019
LICENSE First commit Feb 8, 2017
Package.swift First commit Feb 8, 2017 Update Sep 19, 2018


Normally a UICollectionView has no transition effects when you scroll from one item to another. There are lots of ways to write animations for UICollectionView, but using a UICollectionViewLayout subclass is by far the simplest one. And it doesn't break any of your existing code. You can still use your UICollectionView subclass and you don't need to change your UICollectionViewCell. Just plug and enjoy.

CI Status

Parallax ZoomInOut RotateInOut Cards
CrossFade Cube Page


To run the example project, clone the repo, and start iOS Example in Xcode.


  • iOS 8.0+



To integrate AnimatedCollectionViewLayout into your Xcode project using CocoaPods, specify it in your Podfile:

For Swift 4.2:

pod 'AnimatedCollectionViewLayout'

For Swift 4.1 or below:

pod 'AnimatedCollectionViewLayout', '~> 0.3.0'


Get Started

Import the library where you want to use it. Create a AnimatedCollectionViewLayout object, set its animator and assign it to your UICollectionView.

import AnimatedCollectionViewLayout

// ...

let layout = AnimatedCollectionViewLayout()
layout.animator = ParallaxAttributesAnimator()
collectionView.collectionViewLayout = layout


Most of the built-in animators work best in Paging mode and they have additional parameters that you can tweak for better transitions. You can also write your own animators by implementing the protocol LayoutAttributesAnimator.


Jin Wang


AnimatedCollectionViewLayout is available under the MIT license. See the LICENSE file for more info.

You can’t perform that action at this time.