Skip to content

hiragram/YHImageViewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YHImageViewer

Version License Platform

YHImageViewer provides a simple way to show an image on fullscreen.

Minimum features are available. It is still under development.

Issues and PRs are welcome :)

Screenshot

Screenshot

Installation

YHImageViewer is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "YHImageViewer"

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

In your ViewController class:

func imageTapped(recognizer:UITapGestureRecognizer) {
    let imageViewer = YHImageViewer()
    imageViewer.backgroundColor = UIColor.blackColor()
    self.imageViewer = imageViewer
    // ^- This line is required. 
    // If imageViewer is referenced by nothing, 
    // it will be released immediately and window will not appear.
    imageViewer.show(sampleImageView)
}

Roadmaps

Some features under development can be seen in issues or milestones.

v0.3 release

includes:

  • Blurry background
  • Custom view on background / foreground
  • Manager class
  • Drag animation with physics
  • Some refactoring

Author

Yuya Hirayama / @hiragram / [email protected]

Japanese and English are welcome.

License

YHImageViewer is available under the MIT license. See the LICENSE file for more info.