Activity Views

An activity is a task, such as Copy, Favorite, or Find, that’s useful in the current context. Once initiated, an activity can perform a task immediately, or ask for more information before proceeding. Activities are managed by an activity view, which appears as a sheet or popover, depending on the device and orientation. Use activities to give people access to custom services or tasks your app can perform.

The system provides a number of built-in activities, including Print, Message, and AirPlay. These tasks always appear first in activity views and can’t be reordered. You don’t need to create custom activities that perform these built-in tasks. Activity views also display share and action extensions from other apps. See Sharing and Actions.

Design simple template images to represent your custom activities. A template image uses a mask to create an icon. Use black and white with appropriate transparency and antialiasing, and don’t include a drop shadow. Template images should be centered in an area measuring about 70px × 70px.

Craft activity titles that succinctly describe your tasks. Titles appear below the icons in an activity view. Short titles work best. When a title is too long, iOS first shrinks the text and then—if the title is still too long—truncates it. In general, avoid including your company or product name in a title.

Make sure activities are appropriate for the current context. Although system-provided tasks can’t be reordered in an activity, they can be excluded if they aren’t applicable to your app. For example, to prevent people from printing images, you can exclude the Print activity. You can also identify which custom tasks to show at any given time.

Use the Action button to display an activity view. People are accustomed to accessing system-provided activities when they tap the Action button. Avoid confusing people by providing an alternative way to do the same thing.

For developer guidance, see UIActivityViewController and UIActivity.