Is there a way to determine if there is an active HTTP connection in STTwitter library

37 Views Asked by At

I would like to bind a NSProgressIndicator to HTTP activity in STTwitter library. Just wondering if there is a way to determine if a HTTP connection is currently being active?

1

There are 1 best solutions below

0
On

In order to display a network activity indicator, I would keep track of the number of active connections.

Just increment this counter when you start a request, and decrease it in successBlock / errorBlock.

Start the animation when the counter changes from 0 to 1, and stop it when it changes from 1 to 0.