NYTPhotoViewer

A modern photo viewing experience for iOS.

  • 所有者: nytimes/NYTPhotoViewer
  • 平台:
  • 许可证: Other
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

NYTPhotoViewer

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

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 Carthage installed, you can install it via Homebrew with brew install carthage.

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

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'

Requirements

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

Changelog

See CHANGELOG.md.

Contributing

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.

Swift

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.

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.

主要指标

概览
名称与所有者nytimes/NYTPhotoViewer
主编程语言Objective-C
编程语言Objective-C (语言数: 4)
平台
许可证Other
所有者活动
创建于2015-02-11 11:50:50
推送于2025-01-15 15:59:24
最后一次提交2022-10-24 11:19:16
发布数22
最新版本名称5.0.8 (发布于 )
第一版名称0.1.0 (发布于 )
用户参与
星数2.9k
关注者数111
派生数384
提交数1k
已启用问题?
问题数163
打开的问题数57
拉请求数147
打开的拉请求数23
关闭的拉请求数38
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?