---
title: "contains(pasteboardTypes:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uipasteboard/contains(pasteboardtypes:)"
---

# contains(pasteboardTypes:)

Returns whether the pasteboard holds data of the specified representation type.

## Declaration

```swift
func contains(pasteboardTypes: [String]) -> Bool
```

## Parameters

- `pasteboardTypes`: An array of strings. Each string should identify a representation of the pasteboard item that the pasteboard reader can handle. These string are frequently UTIs. See the class description for more information about pasteboard item types.

## Return Value

Return Value true if the pasteboard item holds data of the indicated representation type, otherwise false.

## Discussion

Discussion This method works on the first item in the pasteboard. If there are other items, it ignores them. You can use this method when enabling or disabling the Paste menu command. Starting in iOS 10, you can directly check which data types are present on a pasteboard by using the convenience methods described in Checking for data types on a pasteboard.

## See Also

### Determining types of pasteboard items

- [types](uikit/uipasteboard/types.md)
- [types(forItemSet:)](uikit/uipasteboard/types(foritemset:).md)
- [contains(pasteboardTypes:inItemSet:)](uikit/uipasteboard/contains(pasteboardtypes:initemset:).md)
- [itemSet(withPasteboardTypes:)](uikit/uipasteboard/itemset(withpasteboardtypes:).md)
