Protocol

UIActivityItemSource

The UIActivityItemSource protocol defines the methods used by a UIActivityViewController object to retrieve the data items to act on. You can use this protocol in situations where you want to provide the data from one of your app’s existing objects instead of creating a separate UIActivityItemProvider object. When implementing this protocol, your object becomes the data provider, providing the view controller with access to the items.

Overview

Because the methods of this protocol are executed on your app’s main thread, you should avoid using this protocol in cases where the data objects might take a significant amount of time to create. When creating large data objects, consider using a UIActivityItemProvider object instead.

Symbols

Getting the Data Items

Providing Information About the Data Items

func activityViewController(UIActivityViewController, subjectForActivityType: UIActivityType?)

For activities that support a subject field, returns the subject for the item.

func activityViewController(UIActivityViewController, thumbnailImageForActivityType: UIActivityType?, suggestedSize: CGSize)

For activities that support a preview image, returns a thumbnail preview image for the item.

Relationships

Inherits From