问题
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