I think what you are looking for is:
[UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
Swift 3
UIApplication.shared.isNetworkActivityIndicatorVisible = true
as doc’d here:
https://developer.apple.com/documentation/uikit/uiapplication/1623102-isnetworkactivityindicatorvisibl