Swift 4: Show Network Activity Indicator

I sure am going to be unpopular, but I don’t get why an App is allowed to make “silent” network requests – in other words: I don’t get why the Network Indicator isn’t shown by the OS to alert users that there is network activity going on. However if you have a function, which makes a request, you can rather simply activate the Network Activity Indicator with the following line:

Beware, this line needs to run from the main thread! Also note, that you need to “manually” deactivate it by setting the same value to false

You obviously want to do this, to alert your users that something is going on!

You Might Also Like