Lets see how to change the visibility of the status bar in an iphone/ipad application.

The UIApplication class provides a centralized point of control and coordination for applications running on iOS.

Every application must have exactly one instance of UIApplication (or a subclass of UIApplication). When an application is launched, the UIApplicationMain function is called; among its other tasks, this function creates a singleton UIApplication object. Thereafter you can access this object by invoking the sharedApplication class method.

This object has a method setStatusBarHidden, which can be used to change the visibility of the status bar.

To hide the status bar, use:

[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationFade];

To show the status bar, use:

[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade];

Hope, it helpd! :)

Tagged with:  

Leave a Reply


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Unlimited Domain Hosting Unlimited Domain Hosting
IP Address :
Country : United States
Featured FREE Resource:
More in iOS, Objective C (6 of 11 articles)