An image viewer à la Twitter

Related tags

Image ImageViewer
Overview

CI Status Swift 5.0 Carthage compatible Version Platforms iOS License MIT

Single image view

Gallery

For the latest changes see the CHANGELOG

Install

CocoaPods

pod 'ImageViewer'

Carthage

github "Krisiacik/ImageViewer"

Sample Usage

For a detailed example, see the Example!

// Show the ImageViewer 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 6.0+ is Swift 5 ready! 🎉

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

Swift version ImageViewer version
5.x >= 6.0
4.x 5.0
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

Comments
  • Present modal with custom transition

    Present modal with custom transition

    Changed to make view controller presentable as modal VC using custom transition. Only made a custom transition for the presentation, not the dismissal, where it's not necessary (uses the existing animation).

    opened by mluisbrown 11
  • Wrong version in .podspec file for v3.0

    Wrong version in .podspec file for v3.0

    It seems it's not possible to install the version 3 via cocoapods? The .podspec of v3 points to v2.0.

    I also used this line: pod 'ImageViewer', :git => '[email protected]:MailOnline/ImageViewer.git', :tag => '3.0' or pod 'ImageViewer', :git => '[email protected]:MailOnline/ImageViewer.git', :commit => 'f887383cc4fc32374f4096329253b2df5a79c11a'

    but it produces strange error: GalleryViewController.swift:367:36: Use of unresolved identifier 'ThumbnailsViewController'. Any ideas?

    opened by vvit 10
  • Add iOS 11/iPhone X support

    Add iOS 11/iPhone X support

    • Use safeAreaInsets on iOS 11
    • compensate for erroneous 20 px top inset with hidden status bar on iOS 11
    • add missing .deleteLayout to handling of GalleryConfiguration

    Closes #164

    Bug Enhancement 
    opened by humblehacker 9
  • Asynchronous loading images in galleryviewcontroller

    Asynchronous loading images in galleryviewcontroller

    Hello,

    I've been having trouble figuring out how to setup the asynchronous loading of images in galleryviewcontroller. Could you provide a snippet that will give me a hint on how to do this?

    opened by osolano 9
  • Is it possible to load images from network and use an activity view?

    Is it possible to load images from network and use an activity view?

    Hello!

    Is it possible to use this component when I only have a set of URLs rather the UIImage objects?

    Perhaps https://github.com/MailOnline/ImageViewer/blob/master/ImageViewer/Source/GalleryItem.swift Using GalleryItem, custom enumeration

    But, in that case, how should I add an activity view while the image is downloaded? Can I combine this library with: https://github.com/rs/SDWebImage and use: [imageView sd_setShowActivityIndicatorView:YES]; [imageView sd_setIndicatorStyle:UIActivityIndicatorViewStyleGray];

    Thanks a lot for suggestions.

    opened by Ricardo1980 7
  • Builtin close button assets missing

    Builtin close button assets missing

    button.setImage(UIImage(named: "close_normal"), forState: UIControlState.Normal)
    button.setImage(UIImage(named: "close_highlighted"), forState: UIControlState.Highlighted)
    

    Podspec doesn't add any assets. When I manually copied them from demo project it worked.

    Idea - maybe draw it programmatically instead of using images?

    Enhancement Help needed Proposal 
    opened by ealeksandrov 7
  • Problem with dragging down(in opposition to up) on an image in imageviewcontroller

    Problem with dragging down(in opposition to up) on an image in imageviewcontroller

    For some reason when I try to dismiss an image by swiping down dragging the image down, the image becomes "stuck" to the bottom. Dismissing the image by swiping up works perfectly, as well as through close button. Looked at the code, and both directions should work just fine with the pangesture. Could you help me out? aaaa

    Bug Question 
    opened by wonathanjong 7
  • Fix Typos and other clean up

    Fix Typos and other clean up

    I'm investigating using ImageViewer in our app, and I've submitted a PR with changes I need. I'm also working on further improvements. This is in no way a criticism of the good work you guys have done here, but as I've worked on ImageViewer I've found there to be quite a lot of typos in the code. I'd like to clean them up in a separate PR, but only if the changes would be welcome here. What do you say?

    opened by humblehacker 6
  • Swift 3

    Swift 3

    Fellow Swifters,

    I’ve moved the project to Swift 3. As you know, this is a particularly insidious task that has affected a lot of my time. I think it’d be worthwhile to pull it into the project repository in order to get it into the next release.

    Thanks!

    opened by seifeet 6
  • Swift 3 and SwiftPM support

    Swift 3 and SwiftPM support

    opened by TofPlay 6
  • presenting displaced view maintains its image size, does not fit to new ImageView bounds

    presenting displaced view maintains its image size, does not fit to new ImageView bounds

    Hello, when passing a UIImageView (which has a contentMode of .ScaleAspectFit) as a displaced view, GalleryViewController maintains the image size. If the image is fit by height it maintains the aspect ratio and does not layout to the new bounds.

    passing first image as displaced:

    switching to next image:

    passing second image as displaced:

    switching to first image:

    Bug 
    opened by ghost 6
  • Incorrect image change

    Incorrect image change

    Hello! Calling the galleryViewController.page(toIndex: index) method triggers an animated transition, but the image changes only after the transition is complete.

    opened by emelyanovkirill 2
  • [BUG] Video controls under safe zone on new iPhones

    [BUG] Video controls under safe zone on new iPhones

    Devices that do not have home buttons instead have a greater safe zone at the bottom of the screen. When playing a video, this safe zone is ignored and the video controls are too low to interact with.

    Here is a picture of the issue.

    opened by Ludotrico 3
  • Added support as Swift Package

    Added support as Swift Package

    I had issues with Carthage and the new xcode12. It looks like that Carthage currently no more is usable with Xcode12 and iOS simulator. When you build the frameworks with 'carthage update' or 'carthage build' there comes an error. A deeper look says "have the same architectures (arm64) and can't be in the same fat output file" So the iOS Simulator build is missing in the framework. This already is discussed as issue here https://github.com/Carthage/Carthage/issues/3019 and here https://github.com/ashleymills/Reachability.swift/issues/370

    My workarround was just to move from carthage to Swift Packages. I found out that is really easy to provide an existing iOS framework as Swift Package. Just create a fork of it, put there a configured Package.swift file into the root folder, double click it in finder to open it in Xcode as a SWIFT PACKAGE PROJECT !!! - now just add/change the path to the source files in the Package.swift file. When you could build the project, all is fine and push it to your repo - thats it. For this works.

    Maybe you want to add Swift Package support ?

    opened by nobreak 5
  • [Improvement] Initialize GalleryViewController Crash Error : Disable the Scene Session on Xcode Project

    [Improvement] Initialize GalleryViewController Crash Error : Disable the Scene Session on Xcode Project

    I was using it on new fresh project for playground before integrating with real app on Swift 5. Just want to let know if you're having the same trouble.

    While initialize GalleryViewController for the first time, please make sure that you DISABLE SCENE SESSION on your project :

    • AppDelegate : remove any scene session delegate
    • Remove any scene session related on Info.plist
    • Don't forget to add : var window: UIWindow? (on AppDelegate)

    Otherwise, you will get error in UIApplication without any error log.

    Great library by the way. Cheers. CMIW

    opened by stormwalkerz 0
  • first image not shown when presentationStyle set to `.fade`

    first image not shown when presentationStyle set to `.fade`

    The problem can be identified by setting the presentationStyle to .fade in the example project

    GalleryConfigurationItem.presentationStyle(.fade),

    Is there any workaround for this?

    FYI

    • The library is installed via pod pod 'ImageViewer', :git => 'https://github.com/Krisiacik/ImageViewer.git'

    • My Swift is 4.2

    • This issue should be the same one mentioned is issue #190

    opened by JunsW 0
Releases(6.0.0)
Owner
Kristian Angyal
Kristian Angyal
DTPhotoViewerController - A fully customizable photo viewer ViewController to display single photo or collection of photos, inspired by Facebook photo viewer.

DTPhotoViewerController Example Demo video: https://youtu.be/aTLx4M4zsKk DTPhotoViewerController is very simple to use, if you want to display only on

Tung Vo 277 Dec 17, 2022
Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift

SKPhotoBrowser [![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-) Simple PhotoBrowser

keishi suzuki 2.4k Jan 6, 2023
Twitter Image Pipeline is a robust and performant image loading and caching framework for iOS clients

Twitter Image Pipeline (a.k.a. TIP) Background The Twitter Image Pipeline is a streamlined framework for fetching and storing images in an application

Twitter 1.8k Dec 17, 2022
Agrume - 🍋 An iOS image viewer written in Swift with support for multiple images.

Agrume An iOS image viewer written in Swift with support for multiple images. Requirements Swift 5.0 iOS 9.0+ Xcode 10.2+ Installation Use Swift Packa

Jan Gorman 601 Dec 26, 2022
Image slide-show viewer with multiple predefined transition styles, with ability to create new transitions with ease.

ATGMediaBrowser ATGMediaBrowser is an image slide-show viewer that supports multiple predefined transition styles, and also allows the client to defin

null 200 Dec 19, 2022
Lightbox is a convenient and easy to use image viewer for your iOS app

Lightbox is a convenient and easy to use image viewer for your iOS app, packed with all the features you expect: Paginated image slideshow. V

HyperRedink 1.5k Dec 22, 2022
Image viewer (or Lightbox) with support for local and remote videos and images

Table of Contents Features Focus Browse Rotation Zoom tvOS Setup Installation License Author Features Focus Select an image to enter into lightbox mod

Nes 534 Jan 3, 2023
Photo Browser / Viewer inspired by Facebook's and Tweetbot's with ARC support, swipe-to-dismiss, image progress and more

IDMPhotoBrowser IDMPhotoBrowser is a new implementation based on MWPhotoBrowser. We've added both user experience and technical features inspired by F

Thiago Peres 2.7k Dec 21, 2022
Swift image slideshow with circular scrolling, timer and full screen viewer

?? ImageSlideshow Customizable Swift image slideshow with circular scrolling, timer and full screen viewer ?? Example To run the example project, clon

Petr Zvoníček 1.7k Dec 21, 2022
A snappy image viewer with zoom and interactive dismissal transition.

A snappy image viewer with zoom and interactive dismissal transition. Features Double tap to zoom in/out Interactive dismissal transition Animate in f

Lucas 421 Dec 1, 2022
A snappy image viewer with zoom and interactive dismissal transition.

A snappy image viewer with zoom and interactive dismissal transition. Features Double tap to zoom in/out Interactive dismissal transition Animate in f

Lucas 421 Dec 1, 2022
An iOS/tvOS photo gallery viewer, useful for viewing a large (or small!) number of photos.

This project is unmaintained. Alex passed away in an accident in late 2019. His love of iOS development will always be remembered. AXPhotoViewer AXPho

Alex Hill 596 Dec 30, 2022
A simple mesh viewer for MacOS based on Swift and Metal and using Assimp for loading meshes

Metal Mesh Viewer A simple triangle mesh viewer for MacOS This application is a simple (triangle) mesh viewer that should be capable of rendering even

J. Andreas Bærentzen 0 Dec 13, 2021
Swift/iOS viewer for photography galleries or portfolios

Swift/iOS viewer for photography galleries or portfolios. The app is intended for photographers who participate in classical photo clubs: a portfolio covers (curated) images that were presented and critiqued within a photo club.

Peter van den Hamer 8 Dec 24, 2022
📷 A composable image editor using Core Image and Metal.

Brightroom - Composable image editor - building your own UI Classic Image Editor PhotosCrop Face detection Masking component ?? v2.0.0-alpha now open!

Muukii 2.8k Jan 3, 2023
An image download extension of the image view written in Swift for iOS, tvOS and macOS.

Moa, an image downloader written in Swift for iOS, tvOS and macOS Moa is an image download library written in Swift. It allows to download and show an

Evgenii Neumerzhitckii 330 Sep 9, 2022
📷 A composable image editor using Core Image and Metal.

Brightroom - Composable image editor - building your own UI Classic Image Editor PhotosCrop Face detection Masking component ?? v2.0.0-alpha now open!

Muukii 2.8k Jan 2, 2023
AsyncImage before iOS 15. Lightweight, pure SwiftUI Image view, that displays an image downloaded from URL, with auxiliary views and local cache.

URLImage URLImage is a SwiftUI view that displays an image downloaded from provided URL. URLImage manages downloading remote image and caching it loca

Dmytro Anokhin 1k Jan 4, 2023
AYImageKit is a Swift Library for Async Image Downloading, Show Name's Initials and Can View image in Separate Screen.

AYImageKit AYImageKit is a Swift Library for Async Image Downloading. Features Async Image Downloading. Can Show Text Initials. Can have Custom Styles

Adnan Yousaf 11 Jan 10, 2022