All Projects → lvnkmn → Zoomy

lvnkmn / Zoomy

Licence: mit
Adds seamless scrollView and instagram like zooming to UIImageViews in any view hierarchy.

Programming Languages

swift
15916 projects
swift4
162 projects

Projects that are alternatives of or similar to Zoomy

Efimageviewzoom
DEPRECATED 🌃 A very simple IBDesignable UIImageView with pinch zoom swift
Stars: ✭ 71 (-45.38%)
Mutual labels:  zoom, uiscrollview, uiimageview
Maplebacon
🍁🥓 Lightweight and fast Swift library for image downloading, caching and transformations
Stars: ✭ 322 (+147.69%)
Mutual labels:  image, cocoapods, uiimageview
Imageslideshow
A Swift Image SlideShow for iOS
Stars: ✭ 68 (-47.69%)
Mutual labels:  image, cocoapods
Stfalconimageviewer
A simple and customizable Android full-screen image viewer with shared image transition support, "pinch to zoom" and "swipe to dismiss" gestures
Stars: ✭ 1,734 (+1233.85%)
Mutual labels:  image, zoom
Silentscrolly
Scroll to hide navigationBar, tabBar and toolBar.
Stars: ✭ 79 (-39.23%)
Mutual labels:  cocoapods, uiscrollview
Aaviewanimator
AAViewAnimator is a set of animations designed for UIView, UIButton, UIImageView with options in iOS, written in Swift.
Stars: ✭ 33 (-74.62%)
Mutual labels:  cocoapods, uiimageview
Extended image
A powerful official extension library of image, which support placeholder(loading)/ failed state, cache network, zoom pan image, photo view, slide out page, editor(crop,rotate,flip), paint custom etc.
Stars: ✭ 1,021 (+685.38%)
Mutual labels:  image, zoom
Network Avatar Picker
A npm module that returns user's social network avatar. Supported providers: facebook, instagram, twitter, tumblr, vimeo, github, youtube and gmail
Stars: ✭ 74 (-43.08%)
Mutual labels:  image, instagram
Toscrollbar
An interactive scroll bar for traversing comically massive scroll views.
Stars: ✭ 90 (-30.77%)
Mutual labels:  cocoapods, uiscrollview
React Image Zoom
React component for desktop browsers for image zoom on mouse hover
Stars: ✭ 97 (-25.38%)
Mutual labels:  image, zoom
Zooming
🔍 Image zoom that makes sense.
Stars: ✭ 1,538 (+1083.08%)
Mutual labels:  image, zoom
Instagrid Js
A Javascript library to do exactly what Instagram Layout application does
Stars: ✭ 13 (-90%)
Mutual labels:  image, instagram
Sdwebimageflplugin
A SDWebImage plugin to support GIF using FLAnimatedImage and category
Stars: ✭ 16 (-87.69%)
Mutual labels:  image, cocoapods
Imageviewer.swift
An easy to use Image Viewer that is inspired by Facebook
Stars: ✭ 1,071 (+723.85%)
Mutual labels:  image, cocoapods
Parallaxheader
Simple way to add parallax header to UIScrollView/UITableView written in Swift.
Stars: ✭ 808 (+521.54%)
Mutual labels:  cocoapods, uiscrollview
Leetheme
优雅的主题管理库- 一行代码完成多样式切换
Stars: ✭ 762 (+486.15%)
Mutual labels:  image, cocoapods
React Magnifier
🔍 React image zoom component
Stars: ✭ 116 (-10.77%)
Mutual labels:  image, zoom
Tysnapshotscroll
一句代码保存截图,将 UIScrollView UITableView UICollectionView UIWebView WKWebView 网页 保存 为 长图 查看。Save the scroll view page as an image,support UIScrollView,UITableView,UICollectionView,UIWebView,WKWebView.(Support iOS13)
Stars: ✭ 709 (+445.38%)
Mutual labels:  image, uiscrollview
React Zmage
一个基于 React 的可缩放图片控件 | A scalable image wrapper power by react
Stars: ✭ 713 (+448.46%)
Mutual labels:  image, zoom
Abmediaview
Media view which subclasses UIImageView, and can display & load images, videos, GIFs, and audio and from the web, and has functionality to minimize from fullscreen, as well as show GIF previews for videos.
Stars: ✭ 79 (-39.23%)
Mutual labels:  image, uiimageview

Version Platform License

Zoomy allows you to add seamless scrollView and instagram like zooming to UIImageViews in any view hierarchy.

Example

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

Setup

Just add

import Zoomy

to the files that of the code that needs zoombehavior.

Usage

All of the folowing snippets are expected to be called from within to your viewcontroller.

Somewhere after viewDidLoad should work just fine.

Scrollable zooming

addZoombehavior(for: imageView)

Insta zooming

addZoombehavior(for: imageView, settings: .instaZoomSettings)

Zooming above navigationbar/tabbar

guard let parentView = parent?.view else { return }
addZoombehavior(for: imageView, in:parentView)

Zooming below UI element

addZoombehavior(for: imageView, below: dismissButton)

Zooming with some custom gesture actions

let settings = Settings.defaultSettings
    .with(actionOnTapOverlay: Action.dismissOverlay)
    .with(actionOnDoubleTapImageView: Action.zoomIn)
        
addZoombehavior(for: imageView, settings: settings)

There's a lot more triggers and actions to choose from.

Zooming a collectionviewcell

public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
    
    //After your regular dequeue and configuration:
    addZoombehavior(for: cell.imageView)
        
    return cell
}

Other examples

pod try 'Zoomy' to load the example project.

Or check some of the sample code directly:

A note about zooming images that live inside scrollviews

Zooming inside any viewhierarchy will work perfectly fine using Zoomy, however sometimes you want to disable existing behaviors while zooming. A good example of this is when zooming images that are subviews of a scrollview.

For best performance just implement these Zoomy.Delegate methods:

extension YourViewController: Zoomy.Delegate {
    
    func didBeginPresentingOverlay(for imageView: Zoomable) {
        scrollView.isScrollEnabled = false
    }
    
    func didEndPresentingOverlay(for imageView: Zoomable) {
        scrollView.isScrollEnabled = true
    }
}

No need to set the viewController as a delegate to anyting. This is infered using conditional conformance. In case you're interested in seeing how this is done, see this and this.

Texture

All the code examples provided above work with texture's ImageNode as well. All that is needed for this is adding extension ASImageNode: Zoomable {} anywhere in your targets sources. See the example projects for basic and more advanced usage of texture.

There's more to come

See the roadmap for upcoming features.

Missing anyting or something is not working as desired? Create an issue and it will likely be picked up.

Support

There may not always be time for personal support on how to implement Zoomy in different scenario's. Hopefully the code is clear enough to get done what's needed 💪. In case you've implemented a scenario thats not described in this readme or the examples, feel free to create a pull request, that would be pretty cool actually.

Installation

Zoomy is available through Swift Package Manager. To install it, simply add it to your project using this repository's URL as explained here.

Credits & Acknowledgements

Cover photo by Leonardo Yip, all other images that have been used can be found on Unsplash.

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].