iPad translucent status bar?

回眸只為那壹抹淺笑 提交于 2019-12-23 18:13:13

问题


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.


回答1:


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.




回答2:


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">




回答3:


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.



来源:https://stackoverflow.com/questions/2887144/ipad-translucent-status-bar

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!