Activity Indicator
April 13, by JULIUS SIRAIT
Cocoa touch provides two types of activity indicators as shown below.

Network activity indicator in status bar should be displayed when network access is taking place for unknown duration. The larger activity indicator that usually put inside toolbar is used for other than network related processing task which probably takes a couple of seconds to finish.
Both indicators only indicate that processing is occurring. It doesn’t tell anything about what should user do. But there are some cases where explicit suggestion is more preferable.

Above, the activity indicator suggests user to wait by adding label to the spinning gear.
You can download the code here. To use it first retain shared instance inside your applicationDidFinishLauncing method.
- (void)applicationDidFinishLaunching:(UIApplication *)application {
[[ActivityIndicator sharedInstance] retain];
[window makeKeyAndVisible];
}
And you should release shared instance inside dealloc method.
- (void) dealloc {
[[ActivityIndicator sharedInstance] release];
[super dealloc];
}
Now you are ready to use it anywhere inside your code.
// Default label is @"Please Wait..." [ActivityIndicator show]; // To hide [ActivityIndicator hide]; // With custom text [ActivityIndicator showWithLabel:NSLocalizedString(@"Hang on a sec...", @"")];