Mono Class Library: MonoTouch.UIKit.UIPasteboard Overview | Members

MonoTouch.UIKit.UIPasteboard.SetData Method

Puts data in the pasteboard for the specified representation type.

[MonoTouch.Foundation.Export("setData:forPasteboardType:")]
public virtual void SetData (MonoTouch.Foundation.NSData data, string forPasteboardType)

Parameters

data

The data object to be written to the pasteboard.

forPasteboardType

A string identifying the representation type of the pasteboard item. This is typically a UTI.

Remarks

Use this method to put data on the pasteboard when the data is not a standard property-list object—that is, an object of the NSString, NSArray, NSDictionary, NSDate, NSNumber, or NSURL class. (For property-list objects, use the UIPasteboard.SetValue(MonoTouch.Foundation.NSObject, string) method.) For example, you could archive a graph of model objects and pass the resulting NSData object to a related application via a pasteboard using a custom pasteboard type. This method writes data for the first item in the pasteboard. Calling this method replaces any items currently in the pasteboard.

Requirements

Namespace: MonoTouch.UIKit
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0