Skip to content
Image viewer (or Lightbox) with support for local and remote videos and images
Branch: master
Clone or download
Latest commit 2b1f83e Apr 17, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Update CircleCI Apr 17, 2019
Assets Feature: seek videos (#90) Dec 17, 2016
Demo.xcodeproj Convert to Swift 5 Apr 17, 2019
GitHub Add Bakken & Bæck logo Mar 29, 2017
Library Convert to Swift 5 Apr 17, 2019
Resources/SharedAssets.xcassets Migrate to Swift 3.1 Mar 29, 2017
Source Convert to Swift 5 Apr 17, 2019
Tests Run SwiftFormat Dec 8, 2016
iOS Swift 5 changes Apr 17, 2019
tvOS Convert to Swift 5 Apr 17, 2019
.gitignore Feature/pinch to zoom (#44) Jun 27, 2016
.swift-version Convert to Swift 5 Apr 17, 2019 Rename Dec 14, 2018 Rename Dec 14, 2018 Rename Dec 14, 2018
Package.swift Rename Dec 14, 2018 Drop Author section Dec 14, 2018
Viewer.podspec Convert to Swift 5 Apr 17, 2019


Table of Contents



Select an image to enter into lightbox mode.


Open an image or video to browse.


Portrait or landscape, it just works.


Pinch-to-zoom works seamlessly in images.


Support for the Apple TV.


You'll need a collection of items that comform to the Viewable protocol. Then, from your UICollectionView:

import Viewer

override 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]



pod 'Viewer'


github "3lvis/Viewer"


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

You can’t perform that action at this time.