Why my network activity icon is not displayed in my iPhone application

Im uses the standard:

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

but while the request is missing, both to wait for a response and to download data, the activity icon in the OS (very upper) does not rotate, showing network activity.

Is there a flag or something that I have to enable in order to make it work? Or am I not using the right boot technology?

thank

Mark

+3
source share
3 answers

You need to enable this from your application.

[ UIApplication sharedApplication ].networkActivityIndicatorVisible = YES;
+5
source

: networkActivityIndicatorVisible. , . , iPhone , .

+3

try it.

UIApplication* app = [UIApplication sharedApplication];
app.networkActivityIndicatorVisible = YES;
+1
source

Source: https://habr.com/ru/post/1755869/


All Articles