标签:
http://www.cnblogs.com/onechen/p/4523431.html
XE8 实现 iOS 状态栏的几种效果:



与上述做法相同,只需再多加一个设定:
Project > Options > Version Info (在表格上按鼠标右键来增加)
| Key | Value |
| UIStatusBarStyle | UIStatusBarStyleBlackTranslucent |

请将源码 FMX.Platform.iOS.pas 复制到自己的工程目录里,再进行修改。
找到 TPlatformCocoaTouch.CalculateFormViewFrame 加入下面代码:
function TPlatformCocoaTouch.CalculateFormViewFrame(const AForm: TCommonCustomForm): NSRect;
var
Orientation: NSUInteger;
StatusBarHeight: Single;
Tmp: Single;
begin
if IsPopupForm(AForm) then
Result := CGRectMake(AForm.Left, AForm.Top, AForm.Width, AForm.Height)
else
begin
Result := FMainScreen.bounds;
StatusBarHeight := 0;
{+++>} // 加入下面代码
if AForm.BorderStyle = TFmxFormBorderStyle.ToolWindow then
begin
StatusBarHeight := 0;
FStatusBarHeight := 0;
Result.origin := CGPointMake(0, 0);
end
else
{<+++} // 加入上面代码
if AForm.BorderStyle <> TFmxFormBorderStyle.None then
begin
... 略 ...
end;
目前在某些真机的状态栏下方会显示一条线,见下图:

实测有线:iPhone 6s Plus (只有真机才看的到),(其它皆无此线,如:iPad mini 2, iPhone 4, iPhone 4s)
问题造成原因:不清楚,猜测应该是 Delphi 的问题(如果在意此问题,请自行去提交 QC)。
暂时解决方案:
标签:
原文地址:http://www.cnblogs.com/westsoft/p/5957373.html