Classes
The following classes are available globally.
-
The
NetworkActivityIndicatorManager
manages the state of the network activity indicator in the status bar. When enabled, it will listen for notifications indicating that a URL session task has started or completed and start animating the indicator accordingly. The indicator will continue to animate while the internal activity count is greater than zero.To use the
NetworkActivityIndicatorManager
, theshared
instance should be enabled in theapplication:didFinishLaunchingWithOptions:
method in theAppDelegate
. This can be done with the following:NetworkActivityIndicatorManager.shared.isEnabled = true
By setting the
See moreisEnabled
property totrue
for theshared
instance, the network activity indicator will show and hide automatically as Alamofire requests start and complete. You should not ever need to callincrementActivityCount
anddecrementActivityCount
yourself.Declaration
Swift
public class NetworkActivityIndicatorManager