All Projects → yuriiik → ISVImageScrollView

yuriiik / ISVImageScrollView

Licence: MIT license
Image preview component with zoom, scroll and rotation support

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to ISVImageScrollView

imgcat
Display images and gifs in your terminal.
Stars: ✭ 67 (+139.29%)
Mutual labels:  preview, image-preview
vue-active-preview
🌲 A PhotoSwipe Image Preview component for Vue
Stars: ✭ 22 (-21.43%)
Mutual labels:  preview
scrollRulerView
请使用 CYRuler (Please use CYRuler)
Stars: ✭ 31 (+10.71%)
Mutual labels:  uiscrollview
pdf annotation fix
Fixes macOS Preview garbled annotations
Stars: ✭ 71 (+153.57%)
Mutual labels:  preview
react-bones
💀 Dead simple content loading components for React and React-Native. 💀
Stars: ✭ 42 (+50%)
Mutual labels:  preview
ngx-dropzone
A highly configurable dropzone component for Angular.
Stars: ✭ 123 (+339.29%)
Mutual labels:  preview
Kkfileviewofficeedit
文件在线预览及OFFICE(word,excel,ppt)的在线编辑
Stars: ✭ 234 (+735.71%)
Mutual labels:  preview
mup
A markup previewer
Stars: ✭ 38 (+35.71%)
Mutual labels:  preview
video-snapshot
Get snapshots from a video file in the browser 🎥 🌅
Stars: ✭ 63 (+125%)
Mutual labels:  preview
previewjs
Preview UI components in your IDE instantly
Stars: ✭ 1,331 (+4653.57%)
Mutual labels:  preview
octoview
The missing preview feature for GitHub
Stars: ✭ 52 (+85.71%)
Mutual labels:  preview
svelte-link-preview
Svelte port of @dhaiwat10/react-link-preview
Stars: ✭ 12 (-57.14%)
Mutual labels:  preview
2DUICollectionViewSwift
A simple and elegant 2Dimensional UICollectionView which is most commonly used in ecommerce apps, music streaming apps etc. Easily customisable as per your requirements as it is designed keeping the superset requirement in mind. Developed in latest Swift syntax.
Stars: ✭ 28 (+0%)
Mutual labels:  uiscrollview
json-peek
Stringify JSON *just enough* to see what it is
Stars: ✭ 33 (+17.86%)
Mutual labels:  preview
react-file-input-previews-base64
This package provides an easy to use, ready to go and customizable wrapper around file input, with option for image previews and returning file as base64 string.
Stars: ✭ 15 (-46.43%)
Mutual labels:  preview
Vscode Restructuredtext
reStructuredText Language Support in Visual Studio Code
Stars: ✭ 243 (+767.86%)
Mutual labels:  preview
blur-up
A tool that creates preview images.
Stars: ✭ 28 (+0%)
Mutual labels:  preview
Fast-Image-Resizer
Javafx application to resize images and add them into folders automatically.
Stars: ✭ 27 (-3.57%)
Mutual labels:  image-preview
lfimg
Image preview support for lf (list files) using Überzug
Stars: ✭ 174 (+521.43%)
Mutual labels:  preview
vscode-svg-preview
Svg Preview for VSCode
Stars: ✭ 27 (-3.57%)
Mutual labels:  preview

ISVImageScrollView

CI Status Version License Platform

A subclass of the UIScrollView tweaked for image preview with zooming, scrolling and rotation support.

Overview

When you need to incorporate an image preview into your application, usually you start with the UIScrollView and then spend hours tweaking it to get functionality similar to the default Photos app. This control provides you out-of-the-box functionality to zoom, scroll and rotate an UIImageView attached to it.

Features

  • Pinch to zoom and scroll
  • Tap to zoom
  • Scale image when scroll view bounds change, e.g. after rotation
  • Set appropriate content offset after rotation to make sure visible content remains the same

Example

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

Requirements

  • Tested on iOS 9.3 and higher, but should work on iOS 8.x as well

Installation

CocoaPods

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

pod 'ISVImageScrollView'

Swift Package Manager

ISVImageScrollView is also available via the Swift Package Manager.

Usage

ISVImageScrollView is very easy to use.

  1. Create a UIImageView instance and assign it an image.
  2. Create an ISVImageScrollView instance (either programmatically or via the Storyboard/XIB) and assign the created UIImageView object to its imageView property.
  3. Don't forget to set maximumZoomScale and delegate properties of the ISVImageScrollView instance.
  4. Finally in delegate class implement viewForZoomingInScrollView: method and return the UIImageView object created in step 1.
let image = UIImage(named: "Photo.jpg")
self.imageView = UIImageView(image: image)
self.imageScrollView.imageView = self.imageView
self.imageScrollView.maximumZoomScale = 4.0
self.imageScrollView.delegate = self
func viewForZooming(in scrollView: UIScrollView) -> UIView? {
  return self.imageView
}

Author

Yurii Kupratsevych

[email protected]

License

ISVImageScrollView 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].