/ Published in: Objective C
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// 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];