Delphi XE7:如何在iOS 7中获取本机状态栏行为? [英] Delphi XE7: How to get native statusbar behavior in iOS 7?
问题描述
在iOS 7中,状态栏的默认行为是透明的,但这在Delphi XE7中似乎是不可能的。
状态栏始终与主窗体具有相同的颜色(这是iOS 6中的默认行为)。
Mainform.borderstyle控制是否显示状态栏,但是我找不到任何将其设置为透明的方法。
我尝试在info.plist中设置 UIViewControllerBasedStatusBarAppearance
和 UIStatusBarStyle
并尝试调用
In iOS 7 the default behavior of the statusbar is to be transparent, but that seems impossible in Delphi XE7.
The statusbar always get the same color as the mainform (which was the default behavior in iOS 6).
The Mainform.borderstyle controls if the statusbar is shown or not, but I cannot find any way to set it transparent.
I have tried setting UIViewControllerBasedStatusBarAppearance
and UIStatusBarStyle
in the info.plist and tried to call
TUIApplication.wrap(TUIApplication.OCClass.sharedApplication).setStatusBarStyle(UIStatusBarStyleBlackTranslucent)
但它仍然稳定。
有人成功使它透明吗? -还是这是XE7中的错误(或缺少功能)?
Did anyone succeed in making it transparent? - or is this a bug (or missing feature) in XE7?
推荐答案
我相信您需要将UIViewControllerBasedStatusBarAppearance设置为false在您可以更改状态栏外观之前,先在您的plist中添加
I believe you need to to set the UIViewControllerBasedStatusBarAppearance to false in your plist before you can change the Status bars appearance:
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
这篇关于Delphi XE7:如何在iOS 7中获取本机状态栏行为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!