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

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

License

Notifications You must be signed in to change notification settings

tribalmedia/FMImageView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 "git@github.com: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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published