Giter Club home page Giter Club logo

nytphotoviewer's Introduction

NYTPhotoViewer

Platform Version

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

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];

Installation

Carthage

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.

Cocoapods

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

pod 'NYTPhotoViewer', '~> 1.1.0'

Requirements

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

Changelog

See CHANGELOG.md.

Swift

NYTPhotoViewer is written in Objective-C but is intended to be fully interoperable with Swift. You’ll need to include an Objective-C bridging header like this one from the sample Swift project.

If you experience any interoperability difficulties, please open an issue or pull request and we will work to resolve it.

Inspiration

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.

Implementation

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.

License

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

Contributors

A list of contributors is available through GitHub.

nytphotoviewer's People

Contributors

bcapps avatar cdzombak avatar mpkeefe avatar twigz avatar steve-matthews avatar dzlobin avatar heikkihautala avatar davbeck avatar mattbischoff avatar grantjbutler avatar brimurph avatar danakatz avatar dentelezhkin avatar plu avatar lrossi avatar kimar avatar ondrejhanak avatar prayagverma avatar meta2 avatar

Watchers

James Cloos avatar stefanie avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.