Skip to content

Instantly share code, notes, and snippets.

View eenlo's full-sized avatar

Lo eenlo

  • Irvine
View GitHub Profile
@eenlo
eenlo / PagingCollectionViewController.swift
Created December 20, 2021 23:20 — forked from michaelevensen/PagingCollectionViewController.swift
An example of perfectly paging horizontal UICollectionViewController with overflowing cells. Works great with Storyboard — no need to set any specific attributes, just add this Class to the Controller and set your desired size for the cells like you would normally.
import UIKit
private let reuseIdentifier = "Cell"
class CollectionViewController: UICollectionViewController {
/* Custom scrollView for paging */
let pagingScrollView = UIScrollView()
/* Return item size */