Here’s how you start it:
1 2 |
UIApplication *application = [UIApplication sharedApplication]; application.networkActivityIndicatorVisible = YES; |
And this is how you stop it:
1 2 |
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.