Tutorial :Why doesnt my network activity icon appear in my iPhone app



Question:

Im using the standard:

[NSURLConnection sendSynchronousRequest:theRequest                         returningResponse:&response                                     error:&error];  

method, but while the request is away, for both waiting for the response and downloading the data, the activity icon in the OS (very top) doesnt spin showing network activity.

Is there a flag or something I have to switch on to get it to work? Or am I not using the correct downloading technique?

Thank

Mark


Solution:1

You need to enable that from your application.

[ UIApplication sharedApplication ].networkActivityIndicatorVisible = YES;  


Solution:2

To expand on the other answers: you have to turn the indicator on and off manually with the networkActivityIndicatorVisible property. It has nothing to do with whether and when data actually travels in and out of your app. I originally also thought iPhone automatically intercepts the network traffic and manages the indicator, but nope.


Solution:3

try this.

UIApplication* app = [UIApplication sharedApplication];  app.networkActivityIndicatorVisible = YES;  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »