---
title: "values(forPasteboardType:inItemSet:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uipasteboard/values(forpasteboardtype:initemset:)"
---

# values(forPasteboardType:inItemSet:)

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

## Declaration

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

## Parameters

- `pasteboardType`: A string identifying a representation type. Typically this is a UTI.
- `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 An array of objects that have the type indicated by pasteboardType; or—if the pasteboard type is custom or unknown—an array of NSData objects.

## Discussion

Discussion Returned objects are of one of the following classes, depending on the pasteboard item’s representation type: NSString, NSArray, NSDictionary, NSDate, NSNumber, NSURL, or UIImage.

## See Also

### Getting and setting pasteboard items

- [numberOfItems](uikit/uipasteboard/numberofitems.md)
- [items](uikit/uipasteboard/items.md)
- [addItems(_:)](uikit/uipasteboard/additems(_:).md)
- [setItems(_:options:)](uikit/uipasteboard/setitems(_:options:).md)
- [data(forPasteboardType:)](uikit/uipasteboard/data(forpasteboardtype:).md)
- [data(forPasteboardType:inItemSet:)](uikit/uipasteboard/data(forpasteboardtype:initemset:).md)
- [setData(_:forPasteboardType:)](uikit/uipasteboard/setdata(_:forpasteboardtype:).md)
- [value(forPasteboardType:)](uikit/uipasteboard/value(forpasteboardtype:).md)
- [setValue(_:forPasteboardType:)](uikit/uipasteboard/setvalue(_:forpasteboardtype:).md)
