https://github.com/dimix/imageslideshow
A Swift Image SlideShow for iOS
https://github.com/dimix/imageslideshow
cocoapods controller image image-slideshow imageslideshow ios slideshow slideshow-controller swift swift-5 swift5 viewcontroller xcode
Last synced: 10 months ago
JSON representation
A Swift Image SlideShow for iOS
- Host: GitHub
- URL: https://github.com/dimix/imageslideshow
- Owner: dimix
- License: mit
- Created: 2016-10-16T11:25:41.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-01-25T13:29:42.000Z (almost 4 years ago)
- Last Synced: 2025-03-20T11:46:31.974Z (10 months ago)
- Topics: cocoapods, controller, image, image-slideshow, imageslideshow, ios, slideshow, slideshow-controller, swift, swift-5, swift5, viewcontroller, xcode
- Language: Swift
- Size: 3.05 MB
- Stars: 67
- Watchers: 7
- Forks: 18
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README




# Swift ImageSlideShow for iOS
ImageSlideShow is a simple Slideshow for images (Picture, Photos) for your iOS apps written in Swift 5.
You can use this class on iPhone and iPad as well.

## Features
- All in one slideshow with generic protocol to provide images directly from the model
- Pan-gesture-to-dismiss behaviour (like Facebook)
## Installation with CocoaPods
[CocoaPods](http://cocoapods.org) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like ImageSlideShow in your projects. You can install it with the following command:
```bash
$ gem install cocoapods
```
> CocoaPods 1.0.1+ is required to build ImageSlideShow (along with Swift 5 and Xcode 10).
#### Podfile
To integrate ImageSlideShow into your Xcode project using CocoaPods, specify it in your `Podfile`:
```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target 'TargetName' do
use_frameworks!
pod 'ImageSlideShowSwift'
end
```
Then, run the following command:
```bash
$ pod install
```
## Installation with Carthage
Currently only iOS is supported.
1. Add the following to your [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile):
```
github "dimix/ImageSlideShow"
```
2. Run `carthage update --platform ios`
3. Copy the framework into your project and you are good to go.
## How to Use
#### 1. Import ImageSlideShowSwift module
```swift
Import ImageSlideShowSwift
```
ImageSlideShowSwift
#### 2. Instantiate the controller
```swift
ImageSlideShowViewController.presentFrom(self){ [weak self] controller in
controller.dismissOnPanGesture = true
controller.slides = self?.images
controller.enableZoom = true
controller.controllerDidDismiss = {
print("Controller Dismissed")
}
}
```
You need to provide an array of `[ImageSlideShowProtocol]` objects.
You can use the Demo project to watch details.
## Requirements
Current version is compatible with:
* Swift 5.0
* XCode 10
* iOS 9 or later
Are you searching for an old (unsupported) version? Check out:
* [Swift 2.3](https://github.com/dimix/ImageSlideShow/tree/feature/swift2.3)
* [Swift 3](https://github.com/dimix/ImageSlideShow/tree/tags/0.1.2)
* [Swift 4](https://github.com/dimix/ImageSlideShow/tree/tags/0.1.5)
## Credits
Thanks to Lasse-Hansen for the Carthage support!