O'Reilly logo

The Core iOS Developer’s Cookbook, Fifth Edition by Rich Wardwell, Erica Sadun

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding Services

Each app can provide application-specific services by subclassing the UIActivity class and passing that activity to the UIActivityController on initialization. These custom activities are available in the presented activity view controller alongside the system-provided activities. When selected, the custom activity presents a view controller allowing the user to interact with the passed data or service in some way, such as entering credentials or manipulating the data.

Listing 11-1 introduces a skeletal UIActivity subclass that presents a simple text view. This custom activity is shown in Figure 11-5 as the List Items (Cookbook) option. When this icon is tapped, a custom view controller is presented, displaying a view that lists ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required