I have noticed that some apps like Safari and Mail show a loading indicator in the status bar (the bar at the very top of the phone) when they are accessing the network. Is
A single line code to do that:
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;