Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. iOS
  3. DTPhotoViewerController

DTPhotoViewerController

MITSwift

A customizable iOS photo viewer view controller for displaying single or multiple photos with Facebook-like interactions.

GitHubGitHub
283 stars40 forks0 contributors

What is DTPhotoViewerController?

DTPhotoViewerController is an iOS library that provides a fully customizable photo viewer view controller for displaying single images or collections of photos. It enables smooth transitions and gestures, replicating the intuitive photo viewing experience found in apps like Facebook, making it easy to integrate professional photo galleries into any iOS application.

Target Audience

iOS developers building apps that require embedded photo galleries or viewers, such as social media, e-commerce, or media-heavy applications.

Value Proposition

Developers choose DTPhotoViewerController for its high customizability through subclassing and protocols, native fluid experience with referenced-view transitions, and simplicity in integrating both single and multiple photo displays.

Overview

A fully customizable photo viewer ViewController to display single photo or collection of photos, inspired by Facebook photo viewer.

Use Cases

Best For

  • Adding a Facebook-like photo viewer with smooth zoom animations from thumbnails to full screen.
  • Building custom photo galleries where each photo cell needs additional UI elements like buttons or labels.
  • Implementing gesture-controlled photo viewers with zooming, panning, and dismiss gestures.
  • Creating photo viewers that require fine-grained control over behavior and content via delegate and data source protocols.
  • Displaying collections of photos with a data source pattern, similar to a native iOS photo album.
  • Integrating a photo viewer that supports both single image display and multi-image galleries with minimal code.

Not Ideal For

  • Projects requiring built-in photo editing features like filters or cropping
  • SwiftUI-based applications that prefer native SwiftUI components
  • Teams wanting a drop-in solution with automatic image caching and network loading
  • Apps needing extensive out-of-the-box styling without custom subclassing

Pros & Cons

Pros

Smooth Referenced Transitions

Uses referenced views for seamless zoom animations between thumbnails and full-screen, replicating the fluid experience of apps like Facebook, as shown in the demo GIF.

Extensible Cell Design

Allows subclassing of DTPhotoCollectionViewCell to add custom UI elements per photo, enabling fine-grained customization through registerClassPhotoViewer or registerNibForPhotoViewer methods.

Gesture-Rich Interface

Includes built-in support for zooming, panning, and dismiss gestures, providing an intuitive, native-like photo viewing experience without extra code.

Simple Single Image Setup

For displaying a single image, only requires passing a UIImageView and UIImage instance, making integration straightforward with minimal code, as demonstrated in the README example.

Cons

No Integrated Data Management

Lacks built-in features for image caching, network loading, or pagination, forcing developers to handle data separately with additional libraries or custom code.

UIKit-Only Limitation

Designed solely for UIKit, making it incompatible with SwiftUI without bridging via UIViewControllerRepresentable, which adds complexity for modern iOS projects.

Customization Overhead

Advanced usage requires implementing data source and delegate protocols, along with cell subclassing, increasing development time compared to more opinionated libraries.

Frequently Asked Questions

Quick Stats

Stars283
Forks40
Contributors0
Open Issues7
Last commit4 years ago
CreatedSince 2016

Tags

#ios#photoviewer#swift-package-manager#photo-viewer#swift4#ui-kit#custom-transitions#swift5#mobile-development#cocoapods#swift#xcode#image-gallery#cocoapod

Built With

S
Swift Package Manager
U
UIKit
C
CocoaPods
S
Swift

Included in

iOS51.7kSwift26.0k
Auto-fetched 9 hours ago

Related Projects

KingfisherKingfisher

A lightweight, pure-Swift library for downloading and caching images from the web.

Stars24,390
Forks2,767
Last commit1 day ago
GPU ImageGPU Image

An open source iOS framework for GPU-based image and video processing

Stars20,300
Forks4,555
Last commit2 years ago
NukeNuke

Image loading system

Stars8,660
Forks571
Last commit12 hours ago
FastImageCacheFastImageCache

iOS library for quickly displaying images while scrolling

Stars8,056
Forks920
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