Skip to content
This repository has been archived by the owner on Dec 26, 2019. It is now read-only.

Latest commit

 

History

History
89 lines (66 loc) · 2.21 KB

README.md

File metadata and controls

89 lines (66 loc) · 2.21 KB

FMImageView

MIT licensed Carthage compatible

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

Features

  • 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

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:

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.