Graphics Programs Reference
In-Depth Information
Hiding the Status Bar
When you're being hypnotized, you probably don't want to see the time or your remaining
battery charge - these things cause anxiety. So, you're going to hide the status bar before
you make the window visible. In HypnosisterAppDelegate.m , add a line near the
top of application:didFinishLaunchingWithOptions: .
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
[[UIApplication sharedApplication] setStatusBarHidden:YES
withAnimation:UIStatusBarAnimationFade];
Build and run the application again. Notice the status bar fading out after the application
launches. You can also hide the status bar before your application appears on the screen by
adding a new key-value pair to the application's info property list. To do this, select the
project from the project navigator. Then select the Hypnosister target and the Info pane in
the editor area ( Figure 6.13 ). This pane is an editor for the Info.plist file that is a part
of every iOS application. (You could select the Hypnosister-Info.plist file from
the project navigator, but this interface shows the key-value pairs more clearly.)
Figure 6.13 Info property list with hidden status bar
 
Search WWH ::




Custom Search