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


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?




You need to enable that from your application.

[ UIApplication sharedApplication ].networkActivityIndicatorVisible = YES;  


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.


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
Next Post »