Phonegap - 如何使状态栏黑色? [英] Phonegap - How do i make the statusbar black?

查看:123
本文介绍了Phonegap - 如何使状态栏黑色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很简单,我只是貌似找不到答案。



如何在我的 PhoneGap 中更改iPhone状态栏(顶部带有接收/面板等的细条)从默认灰色变为黑色> iPhone应用程式?



感谢您,
Glen

解决方案

PhoneGap-iPhone应用程序只是一个常规的Xcode iPhone项目。



添加 UIStatusBarStyle UIStatusBarStyleBlackOpaque 到您的 Info.plist


  1. 打开您的Xcode项目(例如 MyApp.xcodeproj

  2. 打开您的 Info.plist 文件(例如 MyApp-Info.plist

  3. 添加新行:

    • 键:状态栏样式

    • 价值:不透明的黑色风格



如果您正在查看RAW键/值对,

 < key> UIStatusBarStyle< / key> 
< string> UIStatusBarStyleBlackOpaque< / string>

您可以在MyApp-Info.plist中右键单击以切换RAW键/值对。 / p>

Pretty simple one that I just seemingly can't find the answer to.

How can i change the iPhone statusbar (thin bar right at the top with the reception/batter etc) from default grey to black in my PhoneGap iPhone application?

Thanks, Glen

解决方案

A PhoneGap-iPhone application is just a regular Xcode iPhone project.

Add UIStatusBarStyle:UIStatusBarStyleBlackOpaque to your Info.plist.

  1. Open your Xcode project (e.g. MyApp.xcodeproj)
  2. Open your Info.plist file (e.g. MyApp-Info.plist)
  3. Add a new row:
    • Key: Status bar style
    • Value: Opaque black style

If you are viewing the RAW Key/Value pairs, then use:

<key>UIStatusBarStyle</key>  
<string>UIStatusBarStyleBlackOpaque</string> 

You can right-click in MyApp-Info.plist to toggle the RAW Key/Value pairs.

这篇关于Phonegap - 如何使状态栏黑色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆