The 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.
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;
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;