KelvinJin/AnimatedCollectionViewLayout
KelvinJin/AnimatedCollectionViewLayout has 4,854 GitHub stars and 345 forks. GitHot measured -1 stars in 24 hours and -2 in 7 days. Last checked 2026-11-13 00:33 UTC. Last push 2020-09-20.
A UICollectionViewLayout subclass that adds custom transitions/animations to the UICollectionView without effecting your existing code.
Crecimiento de estrellas medido
- in 24h
- -1
- in 7 days
- -2
- in 15 days
- Recopilando historial
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalAnimatedCollectionViewLayout
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.
| Parallax | ZoomInOut | RotateInOut | Cards |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
| CrossFade | Cube | Page | |
![]() |
![]() |
![]() |
Example
To run the example project, clone the repo, and start iOS Example in Xcode.
Requirements
- iOS 9.0+
Installation
CocoaPods
To integrate AnimatedCollectionViewLayout into your Xcode project using CocoaPods, specify it in your Podfile:
For Swift 4.2 or above:
pod 'AnimatedCollectionViewLayout'
For Swift 4.1 or below:
pod 'AnimatedCollectionViewLayout', '~> 0.3.0'
Carthage & SPM
Carthage and Swift Package Manager are also supported.
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
License
AnimatedCollectionViewLayout is available under the MIT license. See the LICENSE file for more info.
Explorar proyectos relacionados
ytdl-org/youtube-dl
Programa de línea de comandos para descargar vídeos de YouTube.com y otros sitios de vídeo
141,545 estrellasexcalidraw/excalidraw
Pizarra virtual para esbozar diagramas con aspecto de dibujo a mano
135,559 estrellasgodotengine/godot
Godot Engine – Motor de videojuegos 2D y 3D multiplataforma
120,049 estrellasmrdoob/three.js
Biblioteca 3D de JavaScript.
118,228 estrellas





