What is IBPCollectionViewCompositionalLayout?

At the WWDC 2019, Apple introduced a new form of UICollectionViewLayout. A new UICollectionViewCompositionalLayout class has been added to UIKit to make it easier to create compositional layouts without requiring a custom UICollectionViewLayout.

In iOS 12 and earlier, we need subclassing of UICollectionViewLayout to do that. We have to override lots of methods correctly, and it is error-prone.

With Collection View Compositional Layouts, you can make very complex layout even nested collection views with independently scrolling sections just within few lines of code.

Features:

  •  Inter Item Spacing
  •  Inter Group Spacing
  •  Inter Section Spacing
  •  Fixed Spacing
  •  Flexible Spacing
  •  Nested Groups
  •  Vertical Scrolling
  •  Horizontal Scrolling
  •  Supplemental Views (e.g. Section Header/Footers)
  •  Pinned Section Header/Footers
  •  Decoration Views (e.g. Background Views)
  •  Orthogonal Scrolling
  •  Orthogonal Scrolling Behavior
  •  Estimated Size (Autosizing)
  •  Custom Group Item (Absolute Positions)
  •  Drop-in replacement

Overview

  • Pricing: Free
  • Resource Link: https://github.com/kishikawakatsumi/IBPCollectionViewCompositionalLayout
  • Resource Maker: Kishikawa Katsumi
  • Mobile Platform Destination: iOS Apps
  • Mobile Platform Support: Native iOS
  • Programming Languages: Swift
  • iOS Versions Supported: iOS 10.0+, iOS 11.0+, iOS 12.0+
  • CocoaPods: IBPCollectionViewCompositionalLayout
  • Carthage: kishikawakatsumi/IBPCollectionViewCompositionalLayout