Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jndisrupter/jnphotosviewer
This library for animation transition on images when presenting and dismissing images.
https://github.com/jndisrupter/jnphotosviewer
animation image-viewer images swift transition-animation uiimageview
Last synced: 8 days ago
JSON representation
This library for animation transition on images when presenting and dismissing images.
- Host: GitHub
- URL: https://github.com/jndisrupter/jnphotosviewer
- Owner: JNDisrupter
- License: mit
- Created: 2019-01-20T15:45:42.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-02T05:53:50.000Z (5 months ago)
- Last Synced: 2024-11-07T02:15:40.454Z (11 days ago)
- Topics: animation, image-viewer, images, swift, transition-animation, uiimageview
- Language: Swift
- Homepage:
- Size: 20.8 MB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JNPhotosViewer
[![CI Status](https://img.shields.io/travis/mohammadnabulsi/JNPhotosViewer.svg?style=flat)](https://travis-ci.org/mohammadnabulsi/JNPhotosViewer)
[![Version](https://img.shields.io/cocoapods/v/JNPhotosViewer.svg?style=flat)](https://cocoapods.org/pods/JNPhotosViewer)
[![License](https://img.shields.io/cocoapods/l/JNPhotosViewer.svg?style=flat)](https://cocoapods.org/pods/JNPhotosViewer)
[![Platform](https://img.shields.io/cocoapods/p/JNPhotosViewer.svg?style=flat)](https://cocoapods.org/pods/JNPhotosViewer)## 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](https://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod 'JNPhotosViewer'
```
## Setup```swift
let viewController = JNPhotosViewerViewController()
viewController.imagesList = [JNPhoto]
viewController.delegate = self
viewController.showDownloadButton = false
self.present(viewController, animated: true, completion: nil)
```### Public variables
```swift
var imagesList: Array of JNPhoto
var delegate: JNPhotosViewerViewControllerDelegate
var showDownloadButton: Bool
```
### Public classes1. 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](https://github.com/JNDisrupter/JNPhotosViewer/blob/master/LICENSE) file for more info.