Einzelnen Beitrag anzeigen

Rollo62

Registriert seit: 15. Mär 2007
3.914 Beiträge
 
Delphi 12 Athens
 
#6

AW: [Fmx,Ios 11.2,Rx10.2.2] Statusbar Batterie-Icon

  Alt 30. Jan 2018, 07:37
Ok, ich muss es dann wohl mit einem Dirty-Hack versuchen, bis es da irgendeine Info oder Lösung gibt:

Delphi-Quellcode:
//#### 29.01.18: Workaround iOS-11 iPhoneX TopMargin issue ####
//## in OnFormShow:
//## - added fixed margin 20px on iOS-11, by adding TRectangle w/ background color, see below
//## In Form designer:
//## - Set SystemStatusBar.BackgroundColor := clMyBackground;
//## - Set SystemStatusBar.Visibility := Visible;
//##
//##

{$IF    DEFINED( IOS )}

    if not TOSVersion.Check(11, 0) then // Otherwise keep the fixed TopMargin for SystemStatusBar
    begin
        // Remove the iOS11 Margin ONLY when iOS11 is active
        Panel1_Header.Height := Panel1_Header.Height - RectangleHeaderMarginTop.Height;
        RectangleHeaderMarginTop.Visible := False;
    end;

{$ELSE  DEFINED( IOS )}

    // Remove the Margin on any other platform
    Panel1_Header.Height := Panel1_Header.Height - RectangleHeaderMarginTop.Height;
    RectangleHeaderMarginTop.Visible := False;

{$ENDIF DEFINED( IOS )}

//##
//##
//#### 29.01.18: Workaround iOS-11 iPhoneX TopMargin issue ####
Das scheint erstmal zu funktionieren.

Rollo
  Mit Zitat antworten Zitat