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

- by

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 = YES;

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.



If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site witout any pesky ads! More details here.

Add your voice!

This site uses Akismet to reduce spam. Learn how your comment data is processed.