Search code examples
objective-ccocoa-touchuiapplicationdelegate

Objective-C –Setting network indicator to visible after application is launched


Is it possible to set [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; in - application:didFinishLaunchingWithOptions:

It doesn't seem to work for me.


Solution

  • Check if it gets turned off as wcrane suggested but also make sure you don't have some other 3rd party library in your project that possibly does that. Also, try calling it after a delay of, say, 0.5s or something. E.g.

    [self performSelector:@selector(turnOnNetworkIndicator) withObject:nil afterDelay:0.5]