To run the example project, clone the repo, and run pod install
from the Example directory first.
- iOS 11.0+ / macOS 14+
- Xcode 15.3+
- Swift 5.10+
JNPhotosViewer is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'JNPhotosViewer'
let viewController = JNPhotosViewerViewController()
viewController.imagesList = [JNPhoto]
viewController.delegate = self
viewController.showDownloadButton = false
self.present(viewController, animated: true, completion: nil)
var imagesList: Array of JNPhoto
var delegate: JNPhotosViewerViewControllerDelegate
var showDownloadButton: Bool
- JNPhotosViewerViewController
- JNPhotosViewerViewControllerDelegate
- 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. - 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.
- photosViewerViewController(viewController: JNPhotosViewerViewController, refrenceViewFor photo: JNPhoto) -> UIImageView?
Yara AbuHijleh & Mohammad Nabulsi & Jayel Zaghmoutt
JNPhotosViewer is available under the MIT license. See the LICENSE file for more info. See the LICENSE file for more info.