Skip to content

belkhadir/PinterestStyleLayout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PinterestStyleLayout

A SwiftUI custom layout demo inspired by Pinterest-style masonry grids.
This repository accompanies a blog series on building adaptive layouts using the new SwiftUI Layout protocol.


πŸ“Έ Preview

Pinterest Layout Demo


πŸ— Overview

This project demonstrates a step-by-step approach to creating a custom Pinterest-style layout in SwiftUI, evolving from a simple modulo-based distribution to a more advanced adaptive solution.


πŸš€ Branches & Progress

  • started
    Skeleton code with basic setup but no Layout protocol implementation.

  • finished_modulo_solution
    Initial working layout using a modulo-based item distribution approach.

  • finished_optimized
    Optimized, adaptive layout improving upon the initial solution, with better performance and memory handling.


πŸ“¦ Requirements

  • iOS 16+
  • Swift 5.7+
  • Xcode 14+

πŸ›  Getting Started

  1. Clone the repository
    git clone https://github.com/belkhadir/PinterestStyleLayout.git
  2. Open the project
    cd PinterestStyleLayout
    open PinterestStyleLayout.xcodeproj
  3. Run the project Select a simulator and hit Run in Xcode.

πŸ”— Related Resources

πŸ’¬ Contributing

Feedback, issues, or pull requests are welcome! If you’ve tried the layout in your project or want to suggest improvements, feel free to open an issue or contribute.

🌐 Blog

Read the full blog series at: πŸ‘‰ https://swiftorbit.io

About

A SwiftUI Pinterest-style adaptive layout using the Layout protocol.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages