https://github.com/Minitour/AZImagePreview
iOS Framework that makes it easy to preview images on any UIImageView.
https://github.com/Minitour/AZImagePreview
Last synced: 7 months ago
JSON representation
iOS Framework that makes it easy to preview images on any UIImageView.
- Host: GitHub
- URL: https://github.com/Minitour/AZImagePreview
- Owner: Minitour
- License: mit
- Created: 2017-07-11T20:12:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-08T08:50:31.000Z (almost 5 years ago)
- Last Synced: 2025-07-15T02:35:27.288Z (8 months ago)
- Language: Swift
- Size: 25.8 MB
- Stars: 27
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - AZImagePreview - A framework that makes image viewing easy. (Media / Image)
- awesome-ios-star - AZImagePreview - A framework that makes image viewing easy. (Media / Image)
- fucking-awesome-ios - AZImagePreview - A framework that makes image viewing easy. (Media / Image)
README
# AZImagePreview
iOS Framework that makes it easy to preview images on any UIImageView.
## Screenshots
## Installation:
### Cocoa Pods:
```bash
pod 'AZImagePreview'
```
### Swift Package Manager
You can use [The Swift Package Manager](https://swift.org/package-manager) to install `AZImagePreview` by adding the proper description to your `Package.swift` file:
```swift
// swift-tools-version:4.0
import PackageDescription
let package = Package(
name: "YOUR_PROJECT_NAME",
dependencies: [
.package(url: "https://github.com/Minitour/AZImagePreview.git", from: "1.2.1"),
]
)
```
Then run `swift build` whenever you get prepared.
### Manual:
Simply drag and drop the ```Sources``` folder to your project.
### Conform to the AZPreviewImageViewDelegate protocol:
```swift
extension ViewController: AZPreviewImageViewDelegate{
func previewImageViewInRespectTo(_ previewImageView: UIImageView) -> UIView? {
//return self.view or self.navigationController?.view (if you are using a navigation controller.
return view
}
func previewImageView(_ previewImageView: UIImageView, requestImagePreviewWithPreseneter presenter: AZImagePresenterViewController) {
present(presenter, animated: false, completion: nil)
}
}
```
### Set the delegate on the UIImageView:
```swift
@IBOutlet weak var imageView: UIImageView!
override func viewDidLoad(){
super.viewDidLoad()
imageView.delegate = self
}
```