Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. DisplaySwitcher

DisplaySwitcher

MITSwift1.1

A custom iOS transition between list and grid layouts in UICollectionView with smooth animations.

Visit WebsiteGitHubGitHub
2.3k stars184 forks0 contributors

What is DisplaySwitcher?

DisplaySwitcher is an iOS library that enables smooth animated transitions between list and grid layouts in UICollectionView. It solves the problem of jarring layout switches by providing a polished, interactive transition that maintains scroll position and enhances user experience in apps displaying collections of items.

Target Audience

iOS developers building apps with UICollectionView who need to offer users a choice between list and grid views, such as in social networking apps, dating apps, email clients, or any app featuring lists of contacts or items.

Value Proposition

Developers choose DisplaySwitcher because it provides a ready-made, production-tested solution for layout transitions with smooth animations, precise scroll position handling, and easy integration via CocoaPods or Carthage, saving development time compared to building custom transition logic from scratch.

Overview

Custom transition between two collection view layouts

Use Cases

Best For

  • Adding list/grid toggle functionality to social networking apps
  • Implementing smooth layout transitions in dating app profiles
  • Enhancing email clients with animated contact list views
  • Building iOS apps with switchable display modes for collections
  • Creating polished UICollectionView layout transitions without custom CADisplayLink code
  • Improving user experience in apps with friend or contact lists

Not Ideal For

  • Apps requiring layout transitions beyond simple list/grid switches, such as between three or more distinct layouts
  • Projects built with SwiftUI or targeting iOS versions below 10.0
  • Developers seeking a drop-in component without overriding UICollectionView delegate methods
  • Teams prioritizing minimal code over custom animations for basic layout toggles

Pros & Cons

Pros

Smooth Animation Control

Uses CADisplayLink in TransitionManager for precise frame-by-frame timing, ensuring fluid transitions as detailed in the under-the-hood explanation.

Scroll Position Preservation

BaseLayout implements custom content offset calculations to maintain user scroll position during layout changes, enhancing UX without jarring jumps.

Flexible Content Support

While demoed for contacts, the library works with any UICollectionView content type, as explicitly stated in the use cases section.

Production-Ready Polish

Designed with Sketch and Principle for native iOS feel, offering out-of-the-box polished transitions that save development time.

Cons

Limited Layout Flexibility

Specifically built for only list-to-grid transitions, not adaptable to other layout combinations without significant code modification.

Complex Integration Overhead

Requires overriding multiple UICollectionView methods and managing custom layout classes, increasing setup complexity and potential for errors.

Outdated Tech Stack

Documentation targets Xcode 11 and Swift 5, which may lag behind current iOS development standards and frameworks like SwiftUI.

Frequently Asked Questions

Quick Stats

Stars2,298
Forks184
Contributors0
Open Issues10
Last commit5 years ago
CreatedSince 2016

Tags

#mobile-ui#ios#ui-animation#animation#yalantis#custom-layout#custom-transitions#uicollectionview#cocoapods#swift#carthage

Built With

C
CADisplayLink
C
Carthage
U
UICollectionView
i
iOS
C
CocoaPods
S
Swift

Links & Resources

Website

Included in

iOS51.7k
Auto-fetched 1 day ago

Related Projects

IGListKitIGListKit

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

Stars13,074
Forks1,538
Last commit2 months ago
CollectionKitCollectionKit

Reimagining UICollectionView

Stars4,516
Forks266
Last commit4 years ago
ReusableReusable

A Swift mixin for reusing views easily and in a type-safe way (UITableViewCells, UICollectionViewCells, custom UIViews, ViewControllers, Storyboards…)

Stars2,973
Forks231
Last commit3 years ago
DwifftDwifft

Swift Diff

Stars1,845
Forks147
Last commit3 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub