iOS Guides | Samples

MonoTouch.UIKit.UIActivityItemProvider Class

Abstract class that, when subtyped, can be a proxy for the data of a UIActivity.

See Also: UIActivityItemProvider

Syntax

[MonoTouch.Foundation.Register("UIActivityItemProvider", true)]
[MonoTouch.ObjCRuntime.Introduced(MonoTouch.ObjCRuntime.PlatformName.iOS, 6, 0, MonoTouch.ObjCRuntime.PlatformArchitecture.None, null)]
[MonoTouch.ObjCRuntime.Unavailable(MonoTouch.ObjCRuntime.PlatformName.TvOS, MonoTouch.ObjCRuntime.PlatformArchitecture.All, null)]
public class UIActivityItemProvider : NSOperation, IUIActivityItemSource, IDisposable

See Also

Remarks

This class can be used to provide lightweight proxy data to a UIActivityViewController. Difference services represented by UIActivity classes might require additional processing of the data being sent (for example, one service might take text wrapped in HTML tags while another might require straight text, a service might require images to be converted to a certain format or size, etc.). Rather than perform all that potentially expensive processing for every possible service, a UIActivityItemProvider can be used. Once a the particular service is chosen, the UIActivityItemProvider.Item property is accessed and the needed processing can be performed by the application.

If processing is minimal, application developers may choose to implement UIActivityItemSource rather than subclass UIActivityItemProvider.

The members of this class can be used from a background thread.

Related content

Requirements

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

The members of MonoTouch.UIKit.UIActivityItemProvider are listed below.

See Also: NSOperation

Public Constructors

Default constructor, initializes a new instance of this class.
A constructor that initializes the object from the data stored in the unarchiver object.
Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

[read-only]
ActivityTypeNSString. A string identifying the type of activity.
[read-only]
override
ClassHandleIntPtr. The handle for this class.
[read-only]
ItemNSObject. App devs must override this method, which is called on a background thread, as a factory method for the data-bearing object.
[read-only]
PlaceholderItemNSObject. A placeholder item specified at initialization.

Public Methods

GetDataTypeIdentifierForActivity(UIActivityViewController, NSString) : String
If the specified provides NSData, this method returns the Uniform Type Identifier (UTI) of the item.
GetItemForActivity(UIActivityViewController, NSString) : NSObject
Retrieves the data object on which to act.
GetPlaceholderData(UIActivityViewController) : NSObject
Retrieves the placeholder data.
GetSubjectForActivity(UIActivityViewController, NSString) : String
Returns the subject field for activities that have a subject.
GetThumbnailImageForActivity(UIActivityViewController, NSString, SizeF) : UIImage
Returns a thumbnail for activities that support preview images.