<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIPasteboard/itemSet(withPasteboardTypes:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPasteboard(im)itemSetWithPasteboardTypes:"
  },
  "title" : "itemSet(withPasteboardTypes:)"
}
-->

# itemSet(withPasteboardTypes:)

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

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

## Parameters

`pasteboardTypes`

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

## Return Value

An index set with each integer positionally identifying a pasteboard item that has one of the representation types specified in `pasteboardTypes`.

## Discussion

You can pass the index set returned in this method in a call to [`data(forPasteboardType:inItemSet:)`](/documentation/UIKit/UIPasteboard/data(forPasteboardType:inItemSet:)) or [`values(forPasteboardType:inItemSet:)`](/documentation/UIKit/UIPasteboard/values(forPasteboardType:inItemSet:)) to get the data in the indicated pasteboard items.

## See Also

[`numberOfItems`](/documentation/UIKit/UIPasteboard/numberOfItems)

The number of items for the pasteboard.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)