Mobile App Dev Diary

Android (Java, Kotlin), iOS (Swift), Xamarin (C#)

Objective-C / show and hide indicator in status bar

With objective-c, show and hide indicator in status bar, use this.

Show indicator in status bar.

UIApplication *application = [UIApplication sharedApplication];
[application setNetworkActivityIndicatorVisible:YES];

Hide indicator from status bar.

UIApplication *application = [UIApplication sharedApplication];
[application setNetworkActivityIndicatorVisible:NO];
Remove all ads