https://github.com/donggyushin/dgzoomableimageview
A zoomable, pan-able image view
https://github.com/donggyushin/dgzoomableimageview
imageview swift zoom-images
Last synced: 2 months ago
JSON representation
A zoomable, pan-able image view
- Host: GitHub
- URL: https://github.com/donggyushin/dgzoomableimageview
- Owner: donggyushin
- License: mit
- Created: 2022-01-21T15:12:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-30T16:14:10.000Z (over 3 years ago)
- Last Synced: 2024-12-11T17:50:27.918Z (10 months ago)
- Topics: imageview, swift, zoom-images
- Language: Swift
- Homepage:
- Size: 20.5 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DGZoomableImageView
A zoomable, pan-able image view
![]()
## Requirements
- iOS 12.0+
- Swift 5.5+
- Xcode 10.0+## Installation
### SPM
```
File > Add Packages > https://github.com/donggyushin/DGZoomableImageView
```### CocoaPod
```
pod 'DGZoomableImageView', :git => 'https://github.com/donggyushin/DGZoomableImageView.git'
```## Usage
```
let imageView: DGZoomableImageView = {
let view = DGZoomableImageView()
view.urlString = "https://image.shutterstock.com/image-vector/sample-stamp-grunge-texture-vector-260nw-1389188336.jpg"
return view
}()let imageView: DGZoomableImageView = {
let view = DGZoomableImageView()
view.image = image
return view
}()
```## Properties
| Properties | Description | Default | Type |
| ------------- | ------------- | ------------- | ------------- |
| image | DGZoomableImageView's image | nil | UIImage |
| urlString | You can set image by url string | nil | String |
| imageViewContentMode | image view's content mode | .scaleAspectFit | UIView.ContentMode |