Difference between revisions of "SBAppStatusBarManager"

From iPhone Development Wiki
Jump to: navigation, search
Line 1: Line 1:
 
'''SBAppStatusBarManager''' is a singleton class that manages the status bar. You can access the singleton instance with the nonstandard method as follows:
 
'''SBAppStatusBarManager''' is a singleton class that manages the status bar. You can access the singleton instance with the nonstandard method as follows:
 
<source lang="objc">
 
<source lang="objc">
+(id)sharedInstance
+
+ (id)sharedInstance
 
</source>
 
</source>
This class was not available prior to iOS 7
+
This class was not available prior to iOS 7.
 +
 
 +
== Modification ==
 +
 
 +
The following method can be used to hide the status bar.
 +
<source lang="objc">
 +
- (void)hideStatusBar;
 +
</source>
 +
 
 +
The following method can be used to show the status bar.
 +
<source lang="objc">
 +
- (void)showStatusBar;
 +
</source>
 +
 
 +
The following method can be used to modify the opacity of the status bar.
 +
<source lang="objc">
 +
- (void)setStatusBarAlpha:(float)alpha;
 +
</source>
 +
 
 +
 
 +
However, it should be noted that all changes made to the status bar are temporary, and are reverted to defaults when an app is opened.
  
 
== References ==
 
== References ==
 
{{IPFHeader|SpringBoard|.app}}
 
{{IPFHeader|SpringBoard|.app}}

Revision as of 06:24, 19 October 2013

SBAppStatusBarManager is a singleton class that manages the status bar. You can access the singleton instance with the nonstandard method as follows:

+ (id)sharedInstance

This class was not available prior to iOS 7.

Modification

The following method can be used to hide the status bar.

- (void)hideStatusBar;

The following method can be used to show the status bar.

- (void)showStatusBar;

The following method can be used to modify the opacity of the status bar.

- (void)setStatusBarAlpha:(float)alpha;


However, it should be noted that all changes made to the status bar are temporary, and are reverted to defaults when an app is opened.

References