Recipe: Adding Action Rows

Action rows (aka drawer cells) slide open to expose extra cell-specific functionality when users tap the cell associated with them. You may have seen this kind of functionality in commercial apps such as Tweetbot (http://tapbots.com). Recipe 9-7 builds an action row table featuring a pair of buttons in each of its drawers (see Figure 9-9). When tapped, the Title button sets the title on the navigation bar to the cell text; the Alert button displays the same string in a pop-up alert. iOS developer Bilal Sayed Ahmad (@Demonic_BLITZ on Twitter) suggested adding this recipe to the Cookbook, and this code is inspired from a sample project he created.

Figure 9-9 Action rows offer cell-specific actions that slide open when ...

Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.