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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access