Return to Snippet

Revision: 26514
at April 29, 2010 16:25 by allnatural


Initial Code
// CREATE & ADD SPINNER
UIActivityIndicatorView *activityIndicator = 
    [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 20, 20)];
UIBarButtonItem * barButton = 
    [[UIBarButtonItem alloc] initWithCustomView:activityIndicator];
 
// Set to Left or Right
[[self navigationItem] setRightBarButtonItem:barButton];
 
[barButton release];
[activityIndicator startAnimating];




// REMOVE SPINNER
[[self navigationItem] setLRightBarButtonItem:nil];
[activityIndicator stopAnimating];
[activityIndicator release];

Initial URL
http://iphonedevelopertips.com/user-interface/adding-an-activity-indicator-spinner-to-navigation-bar.html

Initial Description

                                

Initial Title
Create a Busy Activity Indicator Spinner

Initial Tags
iphone

Initial Language
Objective C