Code Monkey home page Code Monkey logo

animatedcollectionviewlayout's Introduction

AnimatedCollectionViewLayout

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

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:

pod 'AnimatedCollectionViewLayout'

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.

animatedcollectionviewlayout's People

Contributors

colorbox avatar filograno avatar kelvinjin avatar naldikt avatar zhongwuzw avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.