Features

Requirements

Installation

To install, simply add the VisualActivityViewController.swift file to your project.

Advanced Usage

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 invar fadeInDuration: TimeInterval =0.3/// The duration for the preview fading outvar fadeOutDuration: TimeInterval =0.3/// The corner radius of the previewvar previewCornerRadius: CGFloat =12/// The corner radius of the preview imagevar previewImageCornerRadius: CGFloat =3/// The side length of the preview imagevar previewImageSideLength: CGFloat =80/// The padding around the previewvar previewPadding: CGFloat =12/// The number of lines to previewvar previewNumberOfLines:Int=5/// The preview color for URL activity itemsvar previewLinkColor: UIColor =UIColor(red: 0, green: 0.47, blue: 1, alpha: 1)
/// The font for the preview labelvar previewFont: UIFont = UIFont.systemFont(ofSize: 18)
/// The margin from the top of the viewController's windowvar previewTopMargin: CGFloat =8/// The margin from the top of the viewController's viewvar previewBottomMargin: CGFloat =8

License

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