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 :)
YHImageViewer is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "YHImageViewer"
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)
}
Some features under development can be seen in issues or milestones.
includes:
- Blurry background
- Custom view on background / foreground
- Manager class
- Drag animation with physics
- Some refactoring
Yuya Hirayama / @hiragram / y@yura.me
Japanese and English are welcome.
YHImageViewer is available under the MIT license. See the LICENSE file for more info.