<!--
{
  "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/value(forPasteboardType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIPasteboard(im)valueForPasteboardType:"
  },
  "title" : "value(forPasteboardType:)"
}
-->

# value(forPasteboardType:)

Returns an object on the pasteboard for the given representation type.

```
func value(forPasteboardType pasteboardType: String) -> Any?
```

## Parameters

`pasteboardType`

A string identifying a representation type of a pasteboard item.

## Return Value

An object that is an instance of the appropriate class based on `pasteboardType` or an <doc://com.apple.documentation/documentation/Foundation/NSData> object containing “raw” data.

## Discussion

This method attempts to return an object that is of a class type appropriate to the representation type, which typically is a UTI. For example, if the representation type is `kUTTypePlainText` (`public.plain-text`), the method returns an <doc://com.apple.documentation/documentation/Foundation/NSString> object. If the method can’t determine the class type from the representation type, it returns the object as a generic object, such as an <doc://com.apple.documentation/documentation/Foundation/NSString>, <doc://com.apple.documentation/documentation/Foundation/NSArray>, <doc://com.apple.documentation/documentation/Foundation/NSDictionary>, <doc://com.apple.documentation/documentation/Foundation/NSDate>, <doc://com.apple.documentation/documentation/Foundation/NSNumber>, <doc://com.apple.documentation/documentation/Foundation/NSURL>, [`UIImage`](/documentation/UIKit/UIImage), or <doc://com.apple.documentation/documentation/Foundation/NSData> object. This method works on the first item in the pasteboard. If there are other items, it ignores them.

---

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)