How to show the Network Activity Indicator (spinning wheel in the iOS status bar)

Here’s how you start it:

UIApplication *application = [UIApplication sharedApplication];
application.networkActivityIndicatorVisible = YES;

And this is how you stop it:

UIApplication *application = [UIApplication sharedApplication];
application.networkActivityIndicatorVisible = NO;

Comes in handy when displaying a UIWebView or performing any other activity that requires the user to “hang in there for a bit”. If you want to create the same effect within a view see here.

Note that you need to conform to the UIWebViewDelegate protocol for this method to be called.





One thought on “How to show the Network Activity Indicator (spinning wheel in the iOS status bar)

Leave a Reply