Skip to content

This library for animation transition on images when presenting and dismissing images.

License

Notifications You must be signed in to change notification settings

JNDisrupter/JNPhotosViewer

Repository files navigation

JNPhotosViewer

CI Status Version License Platform

Preview

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS 11.0+ / macOS 14+
  • Xcode 15.3+
  • Swift 5.10+

Installation

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

pod 'JNPhotosViewer'

Setup

let viewController = JNPhotosViewerViewController()
viewController.imagesList = [JNPhoto]
viewController.delegate = self
viewController.showDownloadButton = false
self.present(viewController, animated: true, completion: nil)

Public variables

var imagesList: Array of JNPhoto
var delegate: JNPhotosViewerViewControllerDelegate
var showDownloadButton: Bool

Public classes

  1. JNPhotosViewerViewController
  2. JNPhotosViewerViewControllerDelegate
    1. photosViewerViewController(viewController: JNPhotosViewerViewController, refrenceViewFor photo: JNPhoto) -> UIImageView?
      This method will return the image view for photo to use for dismiss animation if not provided the default animation will be appiled.
    2. photosViewerViewController(viewController: JNPhotosViewerViewController, didClickDownload photo: JNPhoto, completion: () -> Void)
      This method will be called when the download button clicked, call the completion to hide loading indicator from download button.

Author

Yara AbuHijleh & Mohammad Nabulsi & Jayel Zaghmoutt

License

JNPhotosViewer is available under the MIT license. See the LICENSE file for more info. See the LICENSE file for more info.