Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/3lvis/Viewer
Image viewer (or Lightbox) with support for local and remote videos and images
https://github.com/3lvis/Viewer
imageviewer ios lightbox swift viewer
Last synced: about 1 month ago
JSON representation
Image viewer (or Lightbox) with support for local and remote videos and images
- Host: GitHub
- URL: https://github.com/3lvis/Viewer
- Owner: 3lvis
- License: other
- Archived: true
- Created: 2015-11-23T23:59:42.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-10-04T08:39:26.000Z (over 4 years ago)
- Last Synced: 2024-11-18T05:38:54.742Z (about 2 months ago)
- Topics: imageviewer, ios, lightbox, swift, viewer
- Language: Swift
- Homepage:
- Size: 38.7 MB
- Stars: 532
- Watchers: 12
- Forks: 57
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
- awesome-ios - Viewer - Image viewer (or Lightbox) with support for local and remote videos and images. (Media / Image)
- awesome-swift - Viewer - Image viewer (or Lightbox) with support for local and remote videos and images. (Libs / Images)
- awesome-ios-star - Viewer - Image viewer (or Lightbox) with support for local and remote videos and images. (Media / Image)
- awesome-swift - Viewer - Image viewer (or Lightbox) with support for local and remote videos and images ` 📝 9 months ago ` (Images [🔝](#readme))
README
![Viewer](https://raw.githubusercontent.com/3lvis/Viewer/master/GitHub/viewer-logo-2.jpg)
## Table of Contents
* [Features](#features)
* [Focus](#focus)
* [Browse](#browse)
* [Rotation](#rotation)
* [Zoom](#zoom)
* [tvOS](#tvos)
* [Setup](#setup)
* [Installation](#installation)
* [License](#license)
* [Author](#author)## Features
### Focus
Select an image to enter into lightbox mode.
### Browse
Open an image or video to browse.
### Rotation
Portrait or landscape, it just works.
### Zoom
Pinch-to-zoom works seamlessly in images.
### tvOS
Support for the Apple TV.
## Setup
You'll need a collection of items that comform to the [Viewable protocol](https://github.com/3lvis/Viewer/blob/master/Source/Viewable.swift). Then, from your UICollectionView:
```swift
import Vieweroverride public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard let collectionView = self.collectionView else { return }let viewerController = ViewerController(initialIndexPath: indexPath, collectionView: collectionView)
viewerController.dataSource = self
presentViewController(viewerController, animated: false, completion: nil)
}extension CollectionController: ViewerControllerDataSource {
func viewerController(_ viewerController: ViewerController, viewableAt indexPath: IndexPath) -> Viewable {
return photos[indexPath.row]
}
}
```## Installation
### CocoaPods
```ruby
pod 'Viewer'
```### Carthage
```ruby
github "3lvis/Viewer"
```## License
**Viewer** is available under the MIT license. See the [LICENSE](/LICENSE.md) file for more info.