How to set transparent status bar on iphone

In my application, I want to set state transparency. There are three styles to change the style of the status bar.

  • Gray
  • the black
  • black translucent

mycode:

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent];

How to set a transparent status bar?

+5
source share
6 answers

You can hide the status bar only using the property Status bar is initially hiddenin your info.plist file

-6
source

The best solution to this problem is to set a self.wantsFullScreenLayout = YES;view in your controller and [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];for your status bar.

UPDATE:

, UIStatusBarStyleBlackTranslucent . UIStatusBarStyleLightContent.

+12

info.plist : Transparent Black Style (alpha 0.5).

+2

- info.plist. Apple UIKit pList keys, UIStatusBarStyle ( UIStatusBarStyleBlackTranslucent), , UIStatusBarHidden ( ).

+1

. 3 (, ), , UIView.

, (.. , ), 50% . .

, .

. http://cl.ly/7WST/Untitled-1.png

+1
  • info.plist ( 0,5).
  • viewcontroller.xib .
  • viewcontroller.m viewWillAppear:

self.view.frame = CGRectMake(0,0,320,480);

.

0

All Articles