FMImageView is a slideshow and image viewer with zoom and interactive dismissal transitions.
- Support image slideshow with pagination
- Support double tapping to zoom in/out
- Support remote image loader with caching
- Support the interactive transition animations
- Support custom bottom view
- Support custom configuration
- iOS 9.0+
Insert the following line in your Cartfile:
git "git@github.com:tribalmedia/FMImageView.git"
and run carthage update FMImageView --platform ios --no-use-binaries
var config = Config(initImageView: UIImageView, initIndex: Int)
For details, see Configuration
var datasource = FMImageDataSource(imageURLs: [URL])
or
var datasource = FMImageDataSource(images: [UIImage])
let fmImageVC = FMImageSlideViewController(datasource: datasource, config: config)
fmImageVC.view.frame = UIScreen.main.bounds
self.present(fmImageVC, animated: true)
- Implement callback to handle location of images
let fmImageVC = FMImageSlideViewController(datasource: datasource, config: config)
fmImageVC.didMoveToViewControllerHandler = { index in
// Mark code get imageView by index
fmImageVC.setNewDestinatonFrame(imageView: UIImageView)
}
bottomView
It will always show the bottom Type:HorizontalStackView
Default:nil
Default height:40.0
Made by Tribal Media House with ❤️
FMImageView is released under the MIT license. See LICENSE for details.