Instance Property

activityImage

An image that identifies the service to the user.

Declaration

@property(nonatomic, readonly) UIImage *activityImage;

Return Value

An image that can be presented to the user.

Discussion

This method returns nil by default. Subclasses must override this method and return a valid image object. The image is used to generate a button for your service in the UI displayed by the UIActivityViewController object.

The alpha channel of the image is used as a mask to generate the final image that is presented to the user. Any color data in the image itself is ignored. Opaque pixels have a gradient applied to them and this gradient is then laid on top of a standard background. Thus, a completely opaque image would yield a gradient filled rectangle.

For iPhone and iPod touch, images on iOS 7 should be 60 by 60 points; on earlier versions of iOS, you should use images no larger than 43 by 43 points. For iPad, images on iOS 7 should be 76 by 76 points; on earlier versions of iOS you should use images no larger than 60 by 60 points. On a device with Retina display, the number of pixels is doubled in each direction.

See Also

Getting the Activity Information

activityCategory

Returns the category of the activity, which may be used to group activities in the UI.

UIActivityCategory

Activities have a defined category, and the activity UI may show activities grouped by category.

activityType

An identifier for the type of service being provided.

UIActivityType

Activity types for which the system has built-in support.

activityTitle

A user-readable string describing the service.