TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Feb 2018 |
SPMSupports SPM | ✗ |
Maintained by Quan Vo.
Provides an easy way to manage the Network Activity Indicator with multiple network requests.
show()
and hide()
calls become unbalancedshow()
, in case a network request takes too long, or the calls become unbalancedTo run the example project, clone the repo, and run pod install
from the Example directory first.
WQNetworkActivityIndicator is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'WQNetworkActivityIndicator'
WQNetworkActivityIndicator.shared.show()
WQNetworkActivityIndicator.shared.hide()
WQNetworkActivityIndicator.shared.show()
networkRequestA() {
WQNetworkActivityIndicator.shared.hide()
}
WQNetworkActivityIndicator.shared.show()
networkRequestB() {
WQNetworkActivityIndicator.shared.hide()
}
The Network Activity Indicator will stop showing only when both requests are done.
WQNetworkActivityIndicator.shared.hide(force: true)
The timeout
defaults to 10
seconds. Set it to 0
to disable it:
WQNetworkActivityIndicator.shared.timeout = 0
Based off MXNetworkActivityIndicator.
WQNetworkActivityIndicator is available under the MIT license. See the LICENSE file for more info.