2 // FolioReaderSharingProvider.swift
5 // Created by Heberti Almeida on 02/09/15.
6 // Copyright (c) 2015 Folio Reader. All rights reserved.
11 class FolioReaderSharingProvider: UIActivityItemProvider {
17 init(subject: String, text: String, html: String? = nil, image: UIImage? = nil) {
18 self.subject = subject
23 super.init(placeholderItem: "")
26 override func activityViewController(_ activityViewController: UIActivityViewController, subjectForActivityType activityType: UIActivityType?) -> String {
30 override func activityViewController(_ activityViewController: UIActivityViewController, itemForActivityType activityType: UIActivityType?) -> Any? {
31 if let html = html , activityType == UIActivityType.mail {
35 if let image = image , activityType == UIActivityType.postToFacebook {