UIActivityType Class

Definition

Identifiers for iOS-provided activities.

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 6, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.TvOS, ObjCRuntime.PlatformArchitecture.All, null)]
public static class UIActivityType
type UIActivityType = class
Inheritance
UIActivityType
Attributes

Remarks

These identifiers correspond to the Type property of the iOS-provided UIActivitys.

They are typically used as values for the Type or as parameters in the constructor for UIActivityViewController.

//
// Share an image 
//
var imageToShare = UIImage.FromFile ("demo.png");
var activityItems = new NSObject[] { imageToShare };
var controller = new UIActivityViewController (activityItems, null);
this.PresentViewController(controller, true, null)

// 
// Now share the image, but explicitly exclude posting as a message
//
controller = new UIActivityViewController (activityItems, null) {
    ExcludedActivityTypes = new NSString[] {
        UIActivityType.PostToWeibo,
        UIActivityType.Message
    }
};
this.PresentViewController(controller, true, null)

Properties

AddToReadingList

This activity adds a URL to the Safari Reading List.

AirDrop

Makes the provided object available over AirDrop.

AssignToContact

Assigns a UIImage to a contact.

CopyToPasteboard

Makes the object available on the pasteboard.

Mail

Sends the provided content by email.

MarkupAsPdf
Message

Represents the value associated with the constant UIActivityTypeMessage

OpenInIBooks

Indicates the activity of opening a document in iBooks.

PostToFacebook

Represents the value associated with the constant UIActivityTypePostToFacebook

PostToFlickr

Represents the value associated with the constant UIActivityTypePostToFlickr

PostToTencentWeibo

Represents the value associated with the constant UIActivityTypePostToTencentWeibo

PostToTwitter

Represents the value associated with the constant UIActivityTypePostToTwitter

PostToVimeo

Represents the value associated with the constant UIActivityTypePostToVimeo

PostToWeibo

Represents the value associated with the constant UIActivityTypePostToWeibo

Print

Used to print the provided object.

SaveToCameraRoll

Represents the value associated with the constant UIActivityTypeSaveToCameraRoll

Applies to

See also