Instance Method

setItems(_:options:)

Adds an array of items to a pasteboard, and sets privacy options for all the items on the pasteboard.

Declaration

func setItems(_ items: [[String : Any]], options: [UIPasteboard.OptionsKey : Any] = [:])

Parameters

items

An array of items to add to the pasteboard.

options

The privacy options to apply to all the items on the pasteboard. The available options are described in UIPasteboard.OptionsKey.

See Also

Getting and Setting Multiple Pasteboard Items

var items: [[String : Any]]

The pasteboard items on the pasteboard.

func data(forPasteboardType: String, inItemSet: IndexSet?) -> [Data]?

Returns the data objects in the indicated pasteboard items that have the given representation type.

func values(forPasteboardType: String, inItemSet: IndexSet?) -> [Any]?

Returns the objects in the indicated pasteboard items that have the given representation type.

func addItems([[String : Any]])

Appends pasteboard items to the current contents of the pasteboard.