Instance Method

prepareWithActivityItems:

Prepares your service to act on the specified data.

Declaration

- (void)prepareWithActivityItems:(NSArray *)activityItems;

Parameters

activityItems

An array of objects of varying types. These are the data objects on which to act.

Discussion

The default implementation of this method does nothing. This method is called after the user has selected your service but before your service is asked to perform its action. Subclasses should override this method and use it to store a reference to the data items in the activityItems parameter. In addition, if the implementation of your service requires displaying additional UI to the user, you can use this method to prepare your view controller object and make it available from the activityViewController method.

See Also

Performing the Activity

- canPerformWithActivityItems:

Returns a Boolean indicating whether the service can act on the specified data items.

activityViewController

Returns the view controller to present to the user.

- performActivity

Performs the service when no custom view controller is provided.

- activityDidFinish:

Notifies the system that your activity object has completed its work.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software