Skip to content

Krisiacik/ImageViewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d0330d8 · May 1, 2017
Mar 30, 2016
Apr 11, 2017
Apr 11, 2017
May 1, 2017
Jan 7, 2017
Dec 5, 2015
Oct 14, 2016
Oct 6, 2016
May 1, 2017
May 1, 2017
Dec 5, 2015
May 1, 2017

Repository files navigation

CI Status Swift 3.1 Carthage compatible Version Platforms iOS License MIT

Single image view

Gallery

For the latest changes see the CHANGELOG

Install

CocoaPods

pod 'ImageViewer'

Carthage

github "MailOnline/ImageViewer"

Sample Usage

For a detailed example, see the Example!

// Show the ImageViewer with with the first item
self.presentImageGallery(GalleryViewController(startIndex: 0, itemsDataSource: self))

// The GalleryItemsDataSource provides the items to show
extension ViewController: GalleryItemsDataSource {
    func itemCount() -> Int {
        return items.count
    }

    func provideGalleryItem(_ index: Int) -> GalleryItem {
        return items[index].galleryItem
    }
}

ImageViewer version vs Swift version.

ImageViewer 4.0+ is Swift 3 ready! 🎉

If you use earlier version of Swift - refer to the table below:

Swift version ImageViewer version
3.x >= 4.0
2.3 3.1 ⚠️
2.2 <= 2.1

License

ImageViewer is licensed under the MIT License, Version 2.0. See the LICENSE file for more info.

Copyright (c) 2016 MailOnline