Skip to content

A simple SwiftUI pinch-to-zoom image viewer built as part of a SwiftUI Masterclass course (Chapter 11). The core idea was to work with gestures like pinch, drag, and tap. I also added my own touch by breaking the layout into clean, reusable components to keep the codebase modular and easier to manage.

Notifications You must be signed in to change notification settings

AranFononi/Pinch-App-SwiftUI-MasterClass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pinch & Zoom Viewer πŸ“±πŸ–ΌοΈ

Learning SwiftUI Gestures, Animations & Component Design

This project is from Chapter 11 of the SwiftUI Masterclass. The main goal was to build a pinch-to-zoom image viewer using tap, drag, and magnification gestures. I also took it a step further by breaking everything into small, clean components for better code structure.

πŸ“Œ Project Overview

A minimal SwiftUI image viewer with smooth zoom, drag, and tap-to-reset interactions. UI updates in real-time and stays responsive while scaling or moving the image.

πŸš€ What I Focused On

  • Gestures in SwiftUI: Tap, drag, and magnification
  • Custom Components: Split UI into small reusable views
  • Smooth Animations: Used withAnimation and symbolEffect
  • View Coordination: Managed state across different parts of the app

πŸ”₯ Features

βœ… Pinch to zoom in and out
βœ… Double tap to zoom and reset
βœ… Drag to move image around
βœ… Info panel with scale and position values
βœ… Drawer with thumbnails to switch images
βœ… Clean and modular structure


πŸ“Έ Preview ( might take few seconds to load )

Pinch App Demo


πŸ› οΈ How to Use

  1. Clone the repo
  2. Open the project in Xcode
  3. Run on iPhone simulator or physical device (iOS 16+)

πŸ“¬ Contact

For any questions or feedback, feel free to reach out:

About

A simple SwiftUI pinch-to-zoom image viewer built as part of a SwiftUI Masterclass course (Chapter 11). The core idea was to work with gestures like pinch, drag, and tap. I also added my own touch by breaking the layout into clean, reusable components to keep the codebase modular and easier to manage.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages