Back to rankings

amirdew/CollectionViewPagingLayout

Swift

A simple but highly customizable UICollectionViewLayout for UICollectionView -- Simple SwiftUI views that let you make page-view effects.

uicollectionviewuicollectionviewlayoutswiftuikitlayoutcontrollerscalegallerycoverflowsnapshottransitiontransforms
Star Growth
Stars
2.8k
Forks
325
Weekly Growth
Issues
7
1k2k
Dec 2019Feb 2022May 2024Jul 2026
README

CollectionViewPagingLayout - PagingView for SwiftUI

License platforms pod Carthage compatible Swift Package Manager compatible

Previews

Layout Designer


Custom implementations, UIKit: TransformableView, SwiftUI: TransformPageView

Click on image to see the code

UIKit: SnapshotTransformView, SwiftUI: SnapshotPageView

UIKit: ScaleTransformView, SwiftUI: ScalePageView

UIKit: StackTransformView, SwiftUI: StackPageView

About

UIKit:
A simple but powerful framework that lets you make complex layouts for your UICollectionView.
The implementation is quite simple. Just a custom UICollectionViewLayout that gives you the ability to apply transforms to the cells.
No UICollectionView inheritance or anything like that.

SwiftUI:
A simple View that lets you make page-view effects.
Powered by UICollectionView


For more details, see How to use

Installation

This framework doesn't contain any external dependencies.

CocoaPods

# Podfile
use_frameworks!

target 'YOUR_TARGET_NAME' do
    pod 'CollectionViewPagingLayout'
end

Replace YOUR_TARGET_NAME and then, in the Podfile directory, type:

$ pod install

Carthage

Add this to Cartfile

github "CollectionViewPagingLayout"

and then, in the Cartfile directory, type:

$ carthage update

Swift Package Manager

using Xcode:

File > Swift Packages > Add Package Dependency

Manually

Just add all the files under Lib directory to your project

How to use

Using Layout Designer

There is a macOS app to make it even easier for you to build your custom layout.
It allows you to tweak many options and see the result in real-time.
It also generates the code for you. So, you can copy it to your project.

You can purchase the app from App Store and support this repository, or you can build it yourself from the source.
Yes, the macOS app is open-source too!.

Continue for SwiftUI or UIKit

Limitations

  • Specify the number of visible items:
    You need to specify the number of visible items.
    Since this layout gives you the flexibility to show the next and previous cells,
    By default, it loads all of the cells in the collectionview's frame, which means iOS keeps all of them in the memory.
    Based on your design, you can specify the number of items that you need to show.

  • It doesn't support RTL layouts:
    however, you can achieve a similar result by tweaking options, for instance try StackTransformViewOptions.Layout.reverse

Credit

License

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

Related repositories
Instagram/IGListKit

A data-driven UICollectionView framework for building fast and flexible lists.

Objective-CMIT Licenseuicollectionviewios
instagram.github.io/IGListKit/
13.1k1.5k
Juanpe/SkeletonView

☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting

SwiftMIT Licenseswiftskeleton
12.9k1.1k
WenchaoD/FSPagerView

FSPagerView is an elegant Screen Slide Library. It is extremely helpful for making Banner View、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders.

SwiftMIT Licenseswiftobjective-c
7.4k1.1k
marcosgriselli/ViewAnimator

ViewAnimator brings your UI to life with just one line

SwiftMIT Licenseiosswift
7.3k486
KelvinJin/AnimatedCollectionViewLayout

A UICollectionViewLayout subclass that adds custom transitions/animations to the UICollectionView without effecting your existing code.

SwiftMIT Licenseswiftuicollectionview
4.9k346
chiahsien/CHTCollectionViewWaterfallLayout

The waterfall (i.e., Pinterest-like) layout for UICollectionView.

Objective-CMIT Licenseuicollectionviewpinterest
4.6k689
SoySauceLab/CollectionKit

Reimagining UICollectionView

SwiftMIT Licenseiosswift
4.5k265
youngsoft/MyLinearLayout

MyLayout is a powerful iOS UI framework implemented by Objective-C. It integrates the functions with Android Layout,iOS AutoLayout,SizeClass, HTML CSS float and flexbox and bootstrap. So you can use LinearLayout,RelativeLayout,FrameLayout,TableLayout,FlowLayout,FloatLayout,PathLayout,GridLayout,LayoutSizeClass to build your App 自动布局 UIView UITableView UICollectionView RTL

Objective-CMIT Licenseautolayoutandroid
4.4k888
roberthein/BouncyLayout

Make. It. Bounce.

SwiftMIT Licensecollectionview
4.2k196
rechsteiner/Parchment

A paging view with a highly customizable menu ✨

SwiftMIT Licenseswiftios
3.5k431
Yalantis/Persei

Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift

SwiftMIT Licenseiosswift
yalantis.com
3.4k309
tigerAndBull/TABAnimated

A skeleton screen loading framework based on native for iOS. (一个由iOS原生组件映射出骨架屏的框架,包含快速植入,低耦合,兼容复杂视图等特点,提供国内主流骨架屏动画的加载方案,同时支持上拉加载更多、自定制动画。)

Objective-CMIT Licenseobjective-cios
3.4k539