NetworkActivityIndicatorObserver

open class NetworkActivityIndicatorObserver

NetworkActivityIndicatorObserver

Shows and hides the Network Activity Indicator automatically, based on the states of requests in the SAPURLSession. It presents the indicator when a request starts and hides it when the request finished. The state of the ActivityIndicator is shared among all the SAPURLSession and SAPURLSessionObserving instances. The observer uses the NetworkActivityIndicatorController to control the presentation of the indicator. When you use this observer never modify the Network Activity Indicator directly but use the NetworkActivityIndicatorController.

The code snippet below demonstrates how to use it:

let indicatorObserver = NetworkActivityIndicatorObserver()
sapURLSession.register(indicatorObserver)
  • Initialises a new instance.

    Declaration

    Swift

    public init()