Instance Method


Returns whether the specified pasteboard items contain data of the given representation types.


func contains(pasteboardTypes: [String], inItemSet itemSet: IndexSet?) -> Bool



An array of strings, with each string identifying a representation type. Typically you use UTIs as pasteboard types.


An index set with each integer value identifying a pasteboard item positionally in the pasteboard. Pass in nil to request all pasteboard items.

Return Value

true if the pasteboard items identified by itemSet have data corresponding to the representation types specified by pasteboardTypes; otherwise, returns false.

See Also

Determining the Types of Multiple Pasteboard Items

var numberOfItems: Int

Returns the number of items in the pasteboard

func types(forItemSet: IndexSet?) -> [[String]]?

Returns an array of representation types for each specified pasteboard item.

func itemSet(withPasteboardTypes: [String]) -> IndexSet?

Returns an index set identifying pasteboard items having the specified representation types.