Swiftpack.co - KaneCheshire/PreviewableActivityViewController as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by KaneCheshire.
KaneCheshire/PreviewableActivityViewController 3.0.1
A `UIActivityViewController` that provides the ability to show a preview of the image being shared.
⭐️ 15
🕓 3 years ago
iOS
.package(url: "https://github.com/KaneCheshire/PreviewableActivityViewController.git", from: "3.0.1")

PreviewableActivityViewController

[![CI Status](http://img.shields.io/travis/Kane Cheshire/PreviewableActivityViewController.svg?style=flat)](https://travis-ci.org/Kane Cheshire/PreviewableActivityViewController) Version License Platform

Example Image

Usage

Default usage is no different from the regular UIActivityViewController . The controller will automatically try to populate the preview image view from the images you provide at initialisation time:

let controller = PreviewableActivityViewController(activityItems: [#imageLiteral(resourceName: "example")])
present(controller, animated: true)

You can optionally customise things like the aspect ratio of the preview image (defaults to 2:1). If you change this aspect ratio, be mindful of running out of space on smaller screens, AirDrop takes up a lot of space.

Requirements

Installation

Swift Package Manager

PreviewableActivityViewController supports SPM, simply add HapticGenerator as a package dependency in Xcode 11 or newer.

Cocoapods

Add the following line to your Podfile:

pod 'PreviewableActivityViewController'

Author

@KaneCheshire

License

PreviewableActivityViewController is available under the MIT license. See the LICENSE file for more info.

GitHub

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

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