Git Product home page Git Product logo

fmimageview's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.