开发者

iPad translucent status bar?

开发者 https://www.devze.com 2023-01-01 04:02 出处:网络
Is there no way to make the status bar translucent for the iPad. I get 开发者_开发问答this error when trying to do this: UIStatusBarStyleBlackTranslucent is not available on this device.The iPad doesn

Is there no way to make the status bar translucent for the iPad. I get 开发者_开发问答this error when trying to do this: UIStatusBarStyleBlackTranslucent is not available on this device.


The iPad doesn't support the translucent status bar.

On iPad devices, the UIStatusBarStyleDefault and UIStatusBarStyleBlackTranslucent styles default to the UIStatusBarStyleBlackOpaque appearance.

It's probably Apple considers the screen is so big that giving 20px (2 ~ 3% of screen size) to the status bar doesn't really matter.


Bizarre. If you write an HTML app with the following meta tag and add it to your home screen, the bar actually IS translucent:

<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">


If you set the value "Transparent black style (alpha of 0.5)" for the key "Status bar style" in the application's plist it will work on launch. As long as you aren't planning on changing it later between opaque and transparent, this is a viable solution.

0

精彩评论

暂无评论...
验证码 换一张
取 消