Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jasudev/zoomable

It is a container that allows you to zoom in and out of an image using only SwiftUI.
https://github.com/jasudev/zoomable

gesture image images imageview imageviewer magnificationgesture pinch pinch-to-zoom pinch-zoom pinchimageview swift swiftui zoom zoom-images zoomable zooming

Last synced: 2 months ago
JSON representation

It is a container that allows you to zoom in and out of an image using only SwiftUI.

Awesome Lists containing this project

README

        

# **Zoomable for SwiftUI**
It is a container that allows you to zoom in and out of an image using only SwiftUI.

[![Platforms](https://img.shields.io/badge/Platforms-iOS%20%7C%20macOS-blue?style=flat-square)](https://developer.apple.com/macOS)
[![iOS](https://img.shields.io/badge/iOS-13.0-blue.svg)](https://developer.apple.com/iOS)
[![macOS](https://img.shields.io/badge/macOS-11.0-blue.svg)](https://developer.apple.com/macOS)
[![instagram](https://img.shields.io/badge/[email protected]?style=flat-square)](https://www.instagram.com/dev.fabula)
[![SPM](https://img.shields.io/badge/SPM-compatible-red?style=flat-square)](https://developer.apple.com/documentation/swift_packages/package/)
[![MIT](https://img.shields.io/badge/licenses-MIT-red.svg)](https://opensource.org/licenses/MIT)

## Screenshot

## Example Usages
1. ZoomableView
```swift
ZoomableView(size: CGSize(width: 300, height: 300), min: 1.0, max: 6.0, showsIndicators: true) {
Image("image")
.resizable()
.scaledToFit()
.background(Color.black)
.clipped()
}
```


3. ZoomableImageView
```swift
ZoomableImageView(url: url, min: 1.0, max: 3.0, showsIndicators: true) {
Text("ZoomableImageView")
.padding()
.background(Color.black.opacity(0.5))
.cornerRadius(8)
.foregroundColor(Color.white)
}
```

## Swift Package Manager
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. Once you have your Swift package set up, adding Zoomable as a dependency is as easy as adding it to the dependencies value of your Package.swift.

```swift
dependencies: [
.package(url: "https://github.com/jasudev/Zoomable.git", .branch("main"))
]
```

## Contact
instagram : [@dev.fabula](https://www.instagram.com/dev.fabula)
email : [[email protected]](mailto:[email protected])

## License
Zoomable is available under the MIT license. See the [LICENSE](LICENSE) file for more info.