Jump to content

Search the Community

Showing results for tags 'safeareainsets'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 1 result

  1. Hi, The following code is used in an app to retrieve the safe area on iOS: function GetSafeAreaLayout: TRectF; var App: UIApplication; Win: UIWindow; Guide: UILayoutGuide; begin App := TUIApplication.Wrap (TUIApplication.OCClass.sharedApplication); Win := TUIWindow.Wrap (App.windows.objectAtIndex (0)); Guide := Win.safeAreaLayoutGuide; Result := Guide.layoutFrame.ToRectF; end; It is triggered in Resize, and worked for all iPhones when compiled under RAD 11.1. However, compiling under 11.2 and 11.3 patch 1, while the above function completes successfully on iPhone SE, 7 & 8, Result.Top returns as 0 when the app first starts (i.e. causes app to overlay system menu at top of phone). Either calling the function again after app start, or re-orientating the phone fixes the issue. This start-up problem does not happen on the iPhoneX. Has anyone else encountered this issue and know of a fix, or is there a better, more reliable way to access the safe area? Please accept my thanks in advance.
×