FMImageView icon indicating copy to clipboard operation
FMImageView copied to clipboard

FMImageView is a slideshow and image viewer with zoom and interactive dismissal transition.

FMImageView

MIT licensed Carthage compatible

FMImageView is a slideshow and image viewer with zoom and interactive dismissal transitions.

Features

  • [x] Support image slideshow with pagination
  • [x] Support double tapping to zoom in/out
  • [x] Support remote image loader with caching
  • [x] Support the interactive transition animations
  • [x] Support custom bottom view
  • [x] Support custom configuration

Requirements

  • iOS 9.0+

Installation

Insert the following line in your Cartfile:

git "[email protected]:tribalmedia/FMImageView.git"

and run carthage update FMImageView --platform ios --no-use-binaries

Usage

Create a configuration object

var config = Config(initImageView: UIImageView, initIndex: Int)

For details, see Configuration

Create a datasource object

var datasource = FMImageDataSource(imageURLs: [URL])

or

var datasource = FMImageDataSource(images: [UIImage])

Controller

let fmImageVC = FMImageSlideViewController(datasource: datasource, config: config)

fmImageVC.view.frame = UIScreen.main.bounds

self.present(fmImageVC, animated: true)

Callback

  • 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)
}

Configuration

The configuration supports the following parameter:

  • bottomView

Reference

  • bottomView
    It will always show the bottom Type: HorizontalStackView
    Default: nil Default height: 40.0

Apps using FMImageView

Author

Made by Tribal Media House with ❤️

License

FMImageView is released under the MIT license. See LICENSE for details.