I know that in order to show / hide throbber in the status bar, I can use
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO; [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
But my program sends commands from many threads, and I need a place to control whether throbber should be shown or hidden.
I thought of a centralized class in which every compilation request will be registered, and this class will know if one or many requests are currently transmitting bytes, and turn on throbber, otherwise turn it off.
Is that the way? Why didn’t Apple make the trombone automatically when the network happens?
source share