How to Show the Network Activity Indicator

Dec 16, 2009   //   by Derek van Vliet   //   Uncategorized  //  1 Comment

Screen shot 2009-12-16 at 10.14.26 PMThe network activity indicator is like the UIActivityIndicatorView we previously discussed, only it sits on the status bar, it is smaller, and believe it or not, it is even easier to manipulate. It’s the little rotating wheel of bars (pictured right) that shows up on the status bar whenever your iPhone is accessing the network.

Show It

If you would like to let your users know that your iPhone app is currently swapping data with the network, you can do so with this simple line of code:

[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;

Hide It

You guessed it: once you’re done showing it, to hide it again, just set the same UIApplication property to NO like so.

[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;

1 Comment

  • HI

Leave a comment

Our Games

Latest Tweets