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

# contains(pasteboardTypes:inItemSet:)

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

## Declaration

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

## Parameters

- `pasteboardTypes`: An array of strings, with each string identifying a representation type. Typically you use UTIs as pasteboard types.
- `itemSet`: 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

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

### Related Documentation

- [numberOfItems](uikit/uipasteboard/numberofitems.md)

### Determining types of pasteboard items

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