wildthink / JDSActivityVC

:globe_with_meridians: UIActivityViewController subclass with URL previews

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JDSActivityViewController

by @jasdev

JDSActivityViewController is a lightweight UIActivityViewController subclass, which can be configured to display a URL to be shared. This was inspired by Tweetbot and Tumblr's usage of this customization.

Screenshots

Installation

CocoaPods

pod 'JDSActivityVC'

Usage

import JDSActivityVC

/* Inside of a UIViewController */
let imageURL = NSURL(string: "http://i.imgur.com/aJYZ20v.gif")!

// Normal UIActivityViewController initializer
let sampleActivityViewController = JDSActivityViewController(activityItems: ["Two Dogs", imageURL], applicationActivities: nil)

// Set display URL
sampleActivityViewController.link = imageURL

presentViewController(sampleActivityViewController, animated: true, completion: nil)

About

:globe_with_meridians: UIActivityViewController subclass with URL previews

License:MIT License


Languages

Language:Swift 79.0%Language:Ruby 21.0%