Latest 0.5.0
Homepage https://github.com/KelvinJin/AnimatedCollectionViewLayout
License MIT
Platforms ios 8.0
Authors

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
AnimatedCollectionViewLayout AnimatedCollectionViewLayout AnimatedCollectionViewLayout AnimatedCollectionViewLayout
CrossFade Cube Page
AnimatedCollectionViewLayout AnimatedCollectionViewLayout AnimatedCollectionViewLayout

Example

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

Requirements

  • iOS 8.0+

Installation

CocoaPods

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'

Usage

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

Customization

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.

Author

Jin Wang

License

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

Latest podspec

{
    "name": "AnimatedCollectionViewLayout",
    "version": "0.5.0",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "summary": "A UICollectionViewLayout subclass that adds customn  transitions/animations to the UICollectionView",
    "description": "A normal UICollectionView has no transition effects when you scroll from onenitem to another. There are lots of ways to write animations fornUICollectionView, but using a UICollectionViewLayout subclass is by far thensimplest one. And it doesn't break any of your existing code. You can stillnuse your UICollectionView subclass and you don't need to change yournUICollectionViewCell. Just plug and enjoy.",
    "homepage": "https://github.com/KelvinJin/AnimatedCollectionViewLayout",
    "authors": {
        "Jin Wang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/KelvinJin/AnimatedCollectionViewLayout.git",
        "tag": "0.5.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Source/**/*.swift"
}

Pin It on Pinterest

Share This