PhotoSlider for Swift
PhotoSlider is a simple photo slider and can delete slider with swiping.
Requirements
- Xcode 9+
- Swift 4.0+
- iOS 10+
Installation
CocoaPods
PhotoSlider is available through CocoaPods. To install
it, simply add the following line to your Podfile:
Carthage
Carthage is a decentralized dependency manager for Cocoa application.
To integrate PhotoSlider into your Xcode project using Carthage, specify it in your Cartfile
:
Then, run the following command to build the PhotoSlider framework:
Usage
Using ZoomingAnimationControllerTransitioning
ZoomingAnimationControllerTransitioning
return imageView for starting position
return sourceImageView for finished position
UIViewControllerTransitioningDelegate
Using UIModalTransitionStyle
select ZoomingAnimationController
Delegation
You can handle the following event:
- optional func photoSliderControllerWillDismiss(viewController: PhotoSlider.ViewController)
- optional func photoSliderControllerDidDismiss(viewController: PhotoSlider.ViewController)
Multiple Image Loader
PhotoSlider use Kingfisher for remote image.
If use SDWebImage in your project, image cache is not shared between Kingfisher and SDWebImage.
In this case you can make custom ImageLoader. default ImageLoader is Kingfisher.
Here is how to change SDWebImage.
First, create custom ImageLoader.
and set ImageLoader.
Author
nakajijapan
Special Thanks
- hikarock
- yhkaplan
- seapy
- antrix1989