MBNetworkIndicator Class Reference

Inherits from NSObject
Declared in MBNetworkIndicator.h

Overview

This class provides a mechanism that coordinates the use of the network activity indicator, so network-based client code can indicate when activity is occurring.

Classes wishing to make use of the device’s network activity indicator should do so by instantiating a new MBNetworkIndicator object and sending it operationStarted, operationFinished, and cancelOperations messages as needed.

The network activity indicator is turned on whenever there is at least one MBNetworkIndicator instance that has at least one operation in progress.

When a MBNetworkIndicator instance is deallocated, if there are any started operations that have not yet finished, the cancelOperations method is called.

Note: Instances of the MBNetworkIndicator class are not thread-safe. However, the underlying mechanism for managing the network activity indicator is thread-safe.

– operationStarted

Indicates that a new network operation has begun.

- (void)operationStarted

Declared In

MBNetworkIndicator.h

– operationFinished

Indicates that an in-progress network operation has completed.

- (void)operationFinished

Declared In

MBNetworkIndicator.h

– cancelOperations

Cancels all in-progress network operations associated with the receiver.

- (void)cancelOperations

Declared In

MBNetworkIndicator.h