Snippets: Set Network Activity Indicator On and Off

This little snippet will let you show the network activity indicator using ShowActivityIndicator(); and hide it with HideActivityIndicator();.
#define ShowActivityIndicator() [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible: YES];
#define HideActivityIndicator() [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible: NO];
If you work with network in your app, then this little code will be an invaluable asset. This will save you a lot of retyping. Just put this in a header file that will be imported in all your files, Constants.h for example.