Click here to support Nimbus development and make a donation at www.pledgie.com !
An iOS framework whose growth is bounded by O(documentation).
Network Activity

Overview

For showing network activity in the device's status bar.

Two methods for keeping track of all active network tasks. These methods are threadsafe and act as a simple counter. When the counter is positive, the network activity indicator is displayed.

Functions

void NINetworkActivityTaskDidStart (void)
void NINetworkActivityTaskDidFinish (void)

For Debugging Only

Methods that will only do anything interesting if the DEBUG preprocessor macro is defined.

void NIEnableNetworkActivityDebugging (void)
void NIDisableNetworkActivityDebugging (void)

Function Documentation

void NINetworkActivityTaskDidStart ( void  )

Increment the number of active network tasks.

The status bar activity indicator will be spinning while there are active tasks.

This method is threadsafe.

Definition at line 32 of file NINetworkActivity.m.

void NINetworkActivityTaskDidFinish ( void  )

Decrement the number of active network tasks.

The status bar activity indicator will be spinning while there are active tasks.

This method is threadsafe.

Definition at line 48 of file NINetworkActivity.m.

void NIEnableNetworkActivityDebugging ( void  )

Enable network activity debugging.

Attention:
This won't do anything unless the DEBUG preprocessor macro is defined.

The Nimbus network activity methods will only work correctly if they are the only methods to touch networkActivityIndicatorVisible. If you are using another library that touches networkActivityIndicatorVisible then the network activity indicator might not accurately represent its state.

When enabled, the networkActivityIndicatorVisible method on UIApplication will be swizzled with a debugging method that checks the global network task count and verifies that state is maintained correctly. If it is found that networkActivityIndicatorVisible is being accessed directly, then an assertion will be fired.

If debugging was previously enabled, this does nothing.

Definition at line 114 of file NINetworkActivity.m.

void NIDisableNetworkActivityDebugging ( void  )

Disable network activity debugging.

Attention:
This won't do anything unless the DEBUG preprocessor macro is defined.

When disabled, the networkActivityIndicatorVisible will be restored if this was previously enabled, otherwise this method does nothing.

If debugging wasn't previously enabled, this does nothing.

Definition at line 123 of file NINetworkActivity.m.

Generated for Nimbus by doxygen 1.7.4-20110629