Recipe: Adding Pull-to-Refresh to Your Table

Pull-to-refresh is a widely used app feature that has become popular in the App Store over the past few years. It lets you refresh tables by pulling down their tops enough to indicate a request. It is so intuitive to use that many wondered why Apple didn’t add it to its UITableViewController class. In iOS 6, though, Apple created a highly stylized and stretchable animated refresh control. With iOS 7, the stretchable control was replaced with a more traditional activity indicator with a slightly expanded animation to provide feedback on the state of the control (see Figure 9-8).

Image

Figure 9-8 You can easily ...

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.