Time for action – implementing the Show Activity Indicator method

When you are performing tasks which are taking a period of time, you will want to provide the user with some form of notification. For tasks for which we are not sure how long it will take, we can use the UIActivityIndicatorView class, which provides us with and is represented as an animated spinner graphic.

The default size of the Activity indicator is a 21-pixel square, but can be changed to 36-pixels by using the UIActivityIndicatorViewStyleWhiteLarge style. In this section, we will look at how to go about implementing this class, combined with the UIAlertView control:

1. Open the GetUsersAttentionViewController.m implementation file.

In the action event which you created for ...

Get Xcode 4 iOS Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.