This project provides a preview of items being shared via UIActivityViewController. Example:
// standard activity view controller
letvc=UIActivityViewController(activityItems:[shareText])
// custom activity view controller with a preview letvc=VisualActivityViewController(text: shareText)- Text, Image, and URL previewing
- Swipe gesture to dismiss the share sheet
- Easy customization (match your app’s style)
- iOS 9.0+
- Xcode 9.0+
To install, simply add the VisualActivityViewController.swift file to your project.
There are quite a few different options to customize the appearance of the preview. Check out the example project to see how some of these options work.
/// The duration for the preview fading in
varfadeInDuration:TimeInterval=0.3
/// The duration for the preview fading out
varfadeOutDuration:TimeInterval=0.3
/// The corner radius of the preview
varpreviewCornerRadius:CGFloat=12
/// The corner radius of the preview image
varpreviewImageCornerRadius:CGFloat=3
/// The side length of the preview image
varpreviewImageSideLength:CGFloat=80
/// The padding around the preview
varpreviewPadding:CGFloat=12
/// The number of lines to preview
varpreviewNumberOfLines:Int=5
/// The preview color for URL activity items
varpreviewLinkColor:UIColor=UIColor(red:0, green:0.47, blue:1, alpha:1)
/// The font for the preview label
varpreviewFont:UIFont=UIFont.systemFont(ofSize:18)
/// The margin from the top of the viewController's window
varpreviewTopMargin:CGFloat=8
/// The margin from the top of the viewController's view
varpreviewBottomMargin:CGFloat=8This project is available under the MIT license. See the LICENSE file for more info.

