SwiftUI iOS Photo Gallery with Side Menu, Swipe to Delete and Pinch to Zoom

Cleanup UI Kit for iOS built with SwiftUI and UIKit

If you have ever opened Threads, Claude, or ChatGPT and felt how natural it is to pull the side menu open with a simple swipe from the left edge, this source code gives you that exact feeling inside your own iOS app. Cleanup is a complete SwiftUI and UIKit hybrid photo gallery interface, written in clean modern Swift, and built to save you the weeks it usually takes to get gestures like this feeling right.

What you get is a working iOS project with four things every photo app, gallery app, storage cleaner app, or media manager app needs. A smooth vertical scrolling grid of photos that feels native and fast. A side menu that slides in exactly like the ones you already know from your favorite apps, opening when you pan right and closing when you pan left, with real momentum and threshold based snapping instead of a stiff linear animation. Pinch and pan to zoom directly inside each photo cell, so users can lift a photo off the grid, scale it up to four times its size, move it around with two fingers, and watch it spring back perfectly into place when they let go. And a swipe to delete gesture on every cell, complete with a red delete indicator, haptic feedback at the right moment, and a satisfying fly away animation when a photo is removed.

Everything is powered by one single pan gesture and a small state machine that decides in real time whether the user wants to open the menu or delete a photo, which is the real engineering challenge this project solves for you. Under the hood you get a UICollectionView driven by a diffable data source for buttery smooth updates, custom UIGestureRecognizerRepresentable bridging into SwiftUI, and a project structure that separates models, extensions, gestures, side menu, and collection view code so you can read it, learn from it, and extend it without getting lost.

This is built for developers making photo gallery apps, screen time and storage cleaner apps, camera roll organizers, media library apps, memory and album apps, or any iOS product where users need to browse, zoom, and clean up large sets of images quickly. Whether you are a solo indie developer shipping your first app or a freelancer who needs a reliable starting point for a client project, this source code hands you a polished interaction pattern that normally takes real trial and error to get right, so you can spend your time on what makes your app unique instead of rebuilding gesture handling from scratch.

The package includes full commented Swift source files, a clear written guide explaining exactly how every file works and in what order the pieces come together, and step by step notes on how to plug your own photo library data into the project using PHAsset from the Photos framework.

Built with SwiftUI, UIKit, Swift 5, and iOS 18. No third party dependencies. Grab the source code, study how it works, and ship something that feels genuinely great to use.