Delphi XE7: How to get native statusbar behavior in iOS 7?

二次信任 提交于 2020-01-02 23:00:12

问题


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)

but it remains solid.

Did anyone succeed in making it transparent? - or is this a bug (or missing feature) in XE7?


回答1:


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


来源:https://stackoverflow.com/questions/27043510/delphi-xe7-how-to-get-native-statusbar-behavior-in-ios-7

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