Reputation: 3269
I am using Alamofire networking library to make requests.
I am performing several different tasks like.
But the network activity indicator is not showing in the status bar for any of the operation.
What can be a possible reason for this behavior?
Is that a thing to worry?
Upvotes: 1
Views: 7186
Reputation: 2596
I did what wattson12 answers asked me to do but it didn't work.
You also need to add the below line as by default start delay for the indicator is 1.
NetworkActivityIndicatorManager.shared.startDelay = 0
If what you are querying is very simple and returns the response within 1 seconds then it won't even show up.
Upvotes: 1
Reputation: 39978
You've to turn on/off network indicator manually, this is not default behaviour. Here is how you do it
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
Swift code
UIApplication.shared.isNetworkActivityIndicatorVisible = true
Upvotes: 5
Reputation: 111
Swift 3.0 compatible code:
UIApplication.shared.isNetworkActivityIndicatorVisible = true
Upvotes: 2
Reputation: 27428
You should manually show network activity indicator like,
UIApplication.sharedApplication().networkActivityIndicatorVisible = true
and false
when want to hide. it will not shown by default.
Hope this will help :)
Upvotes: 0
Reputation: 11174
Since you are using Alamofire you should be using the companion library: https://github.com/Alamofire/AlamofireNetworkActivityIndicator
From their readme, all you need to do is
NetworkActivityIndicatorManager.sharedManager.isEnabled = true
Upvotes: 4