ergunemr / EEZoomableImageView

Provides full screen zoom feature to image view like instagram.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EEZoomableImageView

Provides full screen zooming ability to UIImageView like instagram.


What does EEZoomableImageView do?

Gives full screen zooming ability to UIImageView with no additional code.

It handles number of the touch changes on the screen. There is no weird behaviour like jumping image's center when user removes one finger from the screen, as far as I know. :squirrel:


Setup

Using CocoaPods (Recommended)

Add the line below to your Podfile;

pod 'EEZoomableImageView'

Then you can install it with pod install command.

Manual

Download the sample project, just drag and drop the EEZoomableImageView.swift file to your project.


Usage

Make your image view subclass of EEZoomableImageView. It's simple as that.


Customizable Parameters

Custom parameters can be set through EEZoomableImageView instance

    @IBOutlet weak var zoomableImageView: EEZoomableImageView! {
        didSet {
            zoomableImageView.minZoomScale = 0.5
            zoomableImageView.maxZoomScale = 3.0
            zoomableImageView.resetAnimationDuration = 0.5
            zoomableImageView.zoomDelegate = self
        }
    }
  • minZoomScale: Minimum scale of the zoom imageview. Default value is 1.00
  • maxZoomScale: Maximum scale of the zoom imageview. Default value is 3.00
  • resetAnimationDuration: Duration of the reset animation. Default value is 0.3 sec
  • zoomDelegate: Zoom Delegate is informed when zooming started and ended.
  • isZoomingActive: Flag that indicates whether zooming is active or not. (Read Only)


Questions or Advices

Just send me an email (ergunemr@gmail.com)

About

Provides full screen zoom feature to image view like instagram.

License:MIT License


Languages

Language:Swift 95.4%Language:Ruby 4.6%