O'Reilly logo

Xcode 4 iOS Development by Steven F. Daniel

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

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 ...

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