sample project for `UICollectionViewLayout` implementation

Overview

collection-view-layout-pattern-sample

UICollectionViewLayout implementation pattern.

About

This project is introduced in iOSDC Japan 2021.
sample code for slide

Pattern

list grid mosaic topAligned detail
  • only the list pattern is using iOS 14.0+ API

detail patten

use DetailSectionProvider protocol

protocol DetailSectionProvider {
    func layoutSection(contentWidth: CGFloat, traitCollection: UITraitCollection) -> NSCollectionLayoutSection
    func provideCell(_ collectionView: UICollectionView, indexPath: IndexPath, item: DetailSectionItem) -> UICollectionViewCell
    func provideHeaderView(_ collectionView: UICollectionView, indexPath: IndexPath, section: DetailSection) -> UICollectionReusableView?
    func provideFooterView(_ collectionView: UICollectionView, indexPath: IndexPath, section: DetailSection) -> UICollectionReusableView?
}
struct DetailSectionModel {
    var provider: DetailSectionProvider
    var section: DetailSection
    var items: [DetailSectionItem]
}

Requirements

Requires Xcode12 and iOS 14.0 or later.

You might also like...
UIKit Practice Project – Simple app to store names along with photos of people you've met
UIKit Practice Project – Simple app to store names along with photos of people you've met

People UIKit Practice Project #10 – Simple app to store names along with photos of people you've met Cool Features Light & dark mode support Responsiv

Little project made in swiftUI for an app.

Jou: It's all about jou. A mental wellness app. The project is made in Swift (with the help of SwiftUI) by a team of five members. Main views Mood tra

A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift
A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift

CenteredCollectionView CenteredCollectionView is a lightweight drop in place UICollectionViewFlowLayout that pages and keeps its cells centered, resul

A UICollectionViewLayout subclass displays its items as rows of items similar to the App Store Feature tab without a nested UITableView/UICollectionView hack.
A UICollectionViewLayout subclass displays its items as rows of items similar to the App Store Feature tab without a nested UITableView/UICollectionView hack.

CollectionViewShelfLayout A UICollectionViewLayout subclass displays its items as rows of items similar to the App Store Feature tab without a nested

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

AnimatedCollectionViewLayout Normally a UICollectionView has no transition effects when you scroll from one item to another. There are lots of ways to

A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift
A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift

CenteredCollectionView CenteredCollectionView is a lightweight drop in place UICollectionViewFlowLayout that pages and keeps its cells centered, resul

An extandable mosaic UICollectionViewLayout with a focus on extremely flexible customizations :large_orange_diamond:
An extandable mosaic UICollectionViewLayout with a focus on extremely flexible customizations :large_orange_diamond:

SquareMosaicLayout An extandable mosaic UICollectionViewLayout with a focus on extremely flexible customizations. Note This layout is not of waterfall

UICollectionViewLayout with focused content
UICollectionViewLayout with focused content

SFFocusViewLayout Overview SFFocusViewLayout is a UICollectionViewLayout subclass for displaying focused content on UICollectionView which is the larg

MVVM-Clean with DI implementation sample project

MVVM-Clean with Dependency Provider Introduction This project contains MVVM-Clean architecture and Dependency injection Folder Structure Every module

A starter project for Sample Project in swift 5, Xcode 12.5
A starter project for Sample Project in swift 5, Xcode 12.5

A starter project for Sample Project in swift 5, Xcode 12.5 (also bridging header included so you could use objective c code in it as well ).

A starter project for Sample Project in Objective C.

A starter project for Sample Project in Objective C.

BeatboxiOS - A sample implementation for merging multiple video files and/or image files using AVFoundation

MergeVideos This is a sample implementation for merging multiple video files and

The sample implementation of zip-archived document for a macOS AppKit platform.
The sample implementation of zip-archived document for a macOS AppKit platform.

The sample implementation of zip-archived document for a macOS AppKit platform. You can implement NSDocument-based I/O of archived document in your application like .sketch or .key.

Sample implementation of HDMI Clean out for iPhone or iPad video output.
Sample implementation of HDMI Clean out for iPhone or iPad video output.

HDMIPassThroughSample Sample implementation of HDMI Clean out for iPhone or iPad video output. "Lightning - Digital AV Adapter" can be used to output

Sample iOS project built by SwiftUI + Flux and Combine framework using GitHub API
Sample iOS project built by SwiftUI + Flux and Combine framework using GitHub API

SwiftUI-Flux Flux enables us to have unidirectional data flow and make it testable. It's used to be implemented using RxSwift or ReactiveSwift in the

Sample iOS project built by SwiftUI + MVVM and Combine framework using GitHub API
Sample iOS project built by SwiftUI + MVVM and Combine framework using GitHub API

SwiftUI-MVVM One of the biggest idea for having MVVM is that most of data flow can be testable. Data binding in view layer by SwiftUI is awesome. Howe

This is a sample project that supplements the tutorial written over at my blog on 'Building a music recognization app in SwiftUI with ShazamKit'
This is a sample project that supplements the tutorial written over at my blog on 'Building a music recognization app in SwiftUI with ShazamKit'

Shazam-Kit-Tutorial This is a sample project that supplements the tutorial written over at my blog on 'Building a music recognization app in SwiftUI w

This is a sample AR project written with Swift language for iOS devices

ARSample This is a sample AR project written with Swift language for iOS devices. While I was learning the ARKit framework, I defined this project and

Owner
Toshiki Takezawa
 developer
Toshiki Takezawa
100-days-swift-project-8 - The eighth project from 100 days of Swift course

7 Swifty Words This is the eighth project from Hacking With Swift 100 days of Sw

Bruno Guirra 0 Jan 24, 2022
FlexLayout adds a nice Swift interface to the highly optimized facebook/yoga flexbox implementation. Concise, intuitive & chainable syntax.

FlexLayout adds a nice Swift interface to the highly optimized Yoga flexbox implementation. Concise, intuitive & chainable syntax. Flexbox is an incre

layoutBox 1.7k Dec 30, 2022
Fancy Swift implementation of the Visual Format Language (experimental and doesn't work with the recent version of Swift)

VFLToolbox Autolayout is awesome! VFL a.k.a Visual Format Language is even more awesome because it allows you to shorten constraints setting code. The

0xc010d 144 Jun 29, 2022
VerticalFlowLayout - This implementation is built using a UICollectionView and a custom flowLayout.

VerticalFlowLayout This implementation is built using a UICollectionView and a custom flowLayout. Table of contents Requirements Installation CocoaPod

Alexander Sibirtsev 2 Apr 19, 2022
ios-queryable is an implementation of IQueryable/IEnumerable for Core Data

#ios-queryable is an Objective-C category that provides IQueryable and IEnumerable-like functionality to Core Data. Tired of writing boilerplate Core

Marty Dill 227 Mar 3, 2022
iOS simple project to create half-screen modal view controller with pan

Simple Half-screen view controller, draggable and less code (learning purpose)

Mohd Hafiz 123 Dec 17, 2022
An example project showing how to use `overrideUserInterfaceStyle` to build an in-app light/dark mode switch

OverrideDarkMode A sample project to show how using overrideUserInterfaceStyle enables having a dark / light mode switch directly in the app, while st

Zouhair Mahieddine 1 Jan 19, 2022
Demo project that searches repositories on GitHub and displays details

LookGitUp A test project that queries GitHub and lists the repositories with their name, stars, creation date, user details and user's avatar. Technic

Rashmikant Makwana 0 Nov 30, 2021
PhotoCatalog - PhotoCatalog Project Using Swift

PhotoCatalog Project Setup Clone the project from this link [email protected]:islam

Islam Ibrahim 0 Jan 30, 2022
A project for studying of UICollectionViewCompositionalLayout

UICollectionViewCompositionalLayout A project for studying of UICollectionViewCo

donggyu 7 Jul 3, 2022