PreviewableActivityViewController 3.0

PreviewableActivityViewController 3.0

Maintained by Kane Cheshire.


[![CI Status]( Cheshire/PreviewableActivityViewController.svg?style=flat)]( Cheshire/PreviewableActivityViewController) Version License Platform

Example Image


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.



PreviewableActivityViewController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'PreviewableActivityViewController'


Kane Cheshire,


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