Page Summary
-
The
TAGContainerCallbackprotocol allows clients to receive information about the status of container loading, including success or failure. -
The protocol defines three key methods:
containerRefreshBegin:refreshType:,containerRefreshSuccess:refreshType:, andcontainerRefreshFailure:failure:refreshType:. -
containerRefreshBegin:refreshType:is always called before the corresponding success or failure callbacks, signaling the start of a refresh operation. -
While a
kTAGContainerCallbackRefreshTypeSavedrefresh may occur before akTAGContainerCallbackRefreshTypeNetworkrefresh, there are no other guarantees about the order of refresh events. -
Two refreshes, both
kTAGContainerCallbackRefreshTypeSavedandkTAGContainerCallbackRefreshTypeNetwork, can be outstanding concurrently.
Overview
A protocol that a client may implement to receive information when the contents of the container has been successfully loaded or failed to load.
You may rely on the fact that containerRefreshBegin:refreshType: (TAGContainerCallback-p) will be called for a given TAGContainerCallbackRefreshType before its associated containerRefreshSuccess:refreshType: (TAGContainerCallback-p) or containerRefreshFailure:failure:refreshType: (TAGContainerCallback-p), but shouldn't make any other assumptions about ordering. In particular, there may be two refreshes outstanding at once (both kTAGContainerCallbackRefreshTypeSaved and kTAGContainerCallbackRefreshTypeNetwork), or a kTAGContainerCallbackRefreshTypeSaved refresh may occur before a kTAGContainerCallbackRefreshTypeNetwork refresh.
Public Member Functions | |
| (void) | - containerRefreshBegin:refreshType: |
| Called before the refresh is about to begin. | |
| (void) | - containerRefreshSuccess:refreshType: |
| Called when a refresh has successfully completed for the given refresh type. | |
| (void) | - containerRefreshFailure:failure:refreshType: |
| Called when a refresh has failed to complete for the given refresh type. | |
Member Function Documentation
| - (void) containerRefreshBegin: | (TAGContainer *) | container | |
| refreshType: | (TAGContainerCallbackRefreshType) | refreshType | |
Called before the refresh is about to begin.
- Parameters:
-
container The container being refreshed. refreshType The type of refresh which is starting.
| - (void) containerRefreshSuccess: | (TAGContainer *) | container | |
| refreshType: | (TAGContainerCallbackRefreshType) | refreshType | |
Called when a refresh has successfully completed for the given refresh type.
- Parameters:
-
container The container being refreshed. refreshType The type of refresh which completed successfully.
| - (void) containerRefreshFailure: | (TAGContainer *) | container | |
| failure: | (TAGContainerCallbackRefreshFailure) | failure | |
| refreshType: | (TAGContainerCallbackRefreshType) | refreshType | |
Called when a refresh has failed to complete for the given refresh type.
- Parameters:
-
container The container being refreshed. failure The reason for the refresh failure. refreshType The type of refresh which failed.