Where is the iOS status bar ? It is the area of the top of the iOS device screen that displays the signal and battery. Status bar The default height is 20 pixels, what role does the status bar have in software development? Networked applications can be used to automatically help users download data and are recommended for display in the status bar. The status bar can be used to control the hiding and display of the program, or you can add loading animations on the status bar to make the user feel that they are currently in the download state. The simplest thing to learn is to add the downloaded loading animation above the status bar. as shown in the status bar at the top of the screen, an animated loading icon appears next to the signal icons, which is currently spinning. In addition, this article is intended for general iOS software development.
the code shown and hidden is simple
//Turn on status bar animation
[[uiapplication sharedapplication] setnetworkactivityindicatorvisible: YES]; //Turn off status bar animations [[uiapplication sharedapplication] setnetworkactivityindicatorvisible:NO ]; //Hide status bar [[uiapplication sharedapplication] setstatusbarhidden:YES Withanimation:YES]; //re-set the display area of the window [[uiapplication sharedapplication]. Keywindow setframe:cgrectmake(0, 0, 480 )]; //Reset the location of the title bar display [self. Navigationcontroller. Navigationbar setframe:cgrectmake(0, 0, 44 )];
iOS status bar