Skip to content
A modern photo viewing experience for iOS.
Objective-C Swift Other
Branch: master
Clone or download
Latest commit 533a1fa Dec 11, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add initial contributing guidelines Feb 16, 2017
Carthage/Checkouts Added support for Carthage Mar 2, 2016
Example-Swift style: remove unnecessary Array initializer call Feb 15, 2017
Example example: Improve caption for photo with a loading spinner Jan 31, 2017
Images Adds a demonstration GIF Mar 28, 2015
NYTPhotoViewer.xcodeproj Reimplement Swift example Feb 2, 2017
NYTPhotoViewer docs: add note about default value Nov 7, 2017
NYTPhotoViewerTests Remove `ANIMATED_GIF_SUPPORT` preprocessor conditionals from unit tests Mar 8, 2016
.gitignore Added support for Carthage Mar 2, 2016
.gitmodules Added support for Carthage Mar 2, 2016
.travis.yml Added iphonesimulator as xcode_sdk Apr 2, 2015 chore: update changelog Nov 7, 2017
Cartfile Sync dependency versions specified between CocoaPods and Carthage Mar 8, 2016
Cartfile.resolved Added support for Carthage Mar 2, 2016 Update LICENSE to specify (c) through 2017 Jan 30, 2017
NYTPhotoViewer.podspec Bump to version 2.0.0 Dec 11, 2017 Add initial contributing guidelines Feb 16, 2017


Platform Version Carthage compatible

NYTPhotoViewer is a slideshow and image viewer that includes double-tap to zoom, captions, support for multiple images, interactive flick to dismiss, animated zooming presentation, and more.

Demo GIF


Usage is simple, with the option for more complicated customization when needed through a delegate relationship. In the most basic implementation, just initialize the view controller with an array of photo objects and present it as normal:

NYTPhotosViewController *photosViewController = [[NYTPhotosViewController alloc] initWithPhotos:photos];
[self presentViewController:photosViewController animated:YES completion:nil];

Running the Example

The Example project uses Carthage to integrate its dependencies. If you don’t have Carthge installed, you can install it via Homebrew with brew install carthage.

Then, in your checkout of the NYTPhotoViewer repo, run carthage checkout --use-submodules.



NYTPhotoViewer may be installed via Carthage. To install it, simply add the following line to your Cartfile:

github "NYTimes/NYTPhotoViewer"

Then, following the instructions for integrating Carthage frameworks into your app, link the NYTPhotoViewer and FLAnimatedImage frameworks into your project.

If you don't want support for animated GIFs, you may instead link against only the NYTPhotoViewerCore framework.


NYTPhotoViewer is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'NYTPhotoViewer'


This library requires a deployment target of iOS 8.0 or greater.




Please open pull requests against the develop branch, and add a relevant note to the develop section of the CHANGELOG as part of your pull request.


NYTPhotoViewer is written in Objective-C but is fully interoperable with Swift. If you experience any interoperability difficulties, please open an issue or pull request and we will work to resolve it.


NYTPhotoViewer draws feature inspiration from Facebook and Tweetbot’s image viewers. If this implementation isn’t to your liking, you may consider JTSImageViewController or IDMPhotoBrowser.


NYTPhotoViewer has a straightforward implementation using standard UIKit components. The viewer is a UIViewController and uses UIViewController transitioning APIs for the animated and interactive transitions, a UIPageViewController for horizontal swiping between images, and UIScrollView for image zooming.

It is intended to be used without the need for subclassing, and as such it accepts model objects conforming to a NYTPhoto protocol and provides ample opportunity for customization via the NYTPhotosViewControllerDelegate. Since standard APIs are used, the client has full control over the transitions and customization of the NYTPhotosViewController.


NYTPhotoViewer is available under the Apache 2.0 license. See for more information.


A list of contributors is available through GitHub.

You can’t perform that action at this time.