Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. SquareMosaicLayout

SquareMosaicLayout

MITSwift

An extendable mosaic UICollectionViewLayout for iOS with a focus on extremely flexible customizations.

GitHubGitHub
266 stars19 forks0 contributors

What is SquareMosaicLayout?

SquareMosaicLayout is a custom UICollectionViewLayout for iOS that enables developers to create complex, mosaic-style layouts with predictable, repeating patterns. It solves the problem of building non-standard grid layouts by providing a flexible block-based system for arranging cells. Unlike waterfall layouts, it focuses on layouts where the containing rectangle's size can be predetermined.

Target Audience

iOS developers building apps that require custom, non-standard collection view layouts, such as photo galleries, dashboards, or creative content displays with mosaic patterns.

Value Proposition

Developers choose SquareMosaicLayout for its extreme flexibility and structured approach to customization, allowing them to replicate existing mosaic layouts or create entirely new ones using reusable blocks and patterns without dealing with complex custom layout math.

Overview

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

Use Cases

Best For

  • Creating Pinterest-style mosaic layouts in iOS apps
  • Building custom photo galleries with non-uniform grid arrangements
  • Implementing dashboard interfaces with varied cell sizes and patterns
  • Developing apps that require section-specific layout designs
  • Replicating existing mosaic layouts like TRMosaicLayout or FMMosaicLayout
  • Projects needing both vertical and horizontal scrolling mosaic layouts

Not Ideal For

  • Apps requiring dynamic, content-driven waterfall layouts where cell sizes are unpredictable
  • Projects with simple, uniform grid needs that UICollectionViewFlowLayout can handle easily
  • Teams seeking visual drag-and-drop tools for layout design without coding blocks
  • Rapid prototyping where out-of-the-box layout solutions are preferred over custom configuration

Pros & Cons

Pros

Extendable Block Architecture

Uses reusable blocks and patterns to build complex layouts from simple components, enabling predictable designs as shown in the TRMosaicLayout and FMMosaicLayout copy examples.

Section-Specific Customization

Allows each section to have unique patterns, headers, footers, and backgrounds, providing fine-grained control over visual arrangements, listed in the Capabilities section.

Direction and Spacing Flexibility

Supports both vertical and horizontal scrolling with customizable spacing between sections and blocks, offering versatility in layout design.

Repeated Blocks for Consistency

Enables a single block to be repeated within a section for consistent design elements, reducing redundant code and ensuring uniformity.

Cons

Not for Dynamic Layouts

Explicitly not designed for waterfall-type layouts where cell sizes depend on content, limiting its use for aesthetic styles like Pinterest.

Complex Initial Setup

Requires defining custom classes for blocks and patterns, which involves manual frame calculations and can be time-consuming compared to standard layouts.

Limited Ecosystem Support

As a niche library, it has fewer tutorials, community resources, and updates, making troubleshooting and adoption harder for teams.

Frequently Asked Questions

Quick Stats

Stars266
Forks19
Contributors0
Open Issues3
Last commit7 years ago
CreatedSince 2016

Tags

#ios#uicollectionviewlayout#mosaic-layout#custom-layout#uitableview#ui-components#uicollectionview#mobile-development#cocoapods#swift#uikit

Built With

C
CocoaPods
S
Swift

Included in

iOS51.7k
Auto-fetched 18 hours ago

Related Projects

CHTCollectionViewWaterfallLayoutCHTCollectionViewWaterfallLayout

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

Stars4,613
Forks689
Last commit4 months ago
BouncyLayoutBouncyLayout

Make. It. Bounce.

Stars4,237
Forks196
Last commit6 years ago
CollectionViewSlantedLayoutCollectionViewSlantedLayout

A CollectionView Layout displaying a slanted cells

Stars2,340
Forks135
Last commit5 years ago
CenteredCollectionViewCenteredCollectionView

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

Stars1,485
Forks111
Last commit5 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