Swiftpack.co - Minitour/AZImagePreview as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Minitour.
Minitour/AZImagePreview 1.2.1
iOS Framework that makes it easy to preview images on any UIImageView.
⭐️ 26
🕓 3 years ago
.package(url: "https://github.com/Minitour/AZImagePreview.git", from: "1.2.1")

AZImagePreview

iOS Framework that makes it easy to preview images on any UIImageView.

Screenshots

Installation:

Cocoa Pods:

pod 'AZImagePreview'

Swift Package Manager

You can use The Swift Package Manager to install AZImagePreview by adding the proper description to your Package.swift file:

// 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:


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:


@IBOutlet weak var imageView: UIImageView!

override func viewDidLoad(){
    super.viewDidLoad()
    
    imageView.delegate = self
}

GitHub

link
Stars: 26
Last commit: 3 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

SPM Support
3 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics