Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for iOS 16 - force safeAreaInsets update #53

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

a-neuses
Copy link
Contributor

@a-neuses a-neuses commented Aug 16, 2023

Checklist

  • All tests are passed.
  • Added tests or Playbook scenario.
  • Documented the code using Xcode markup.
  • Searched existing pull requests for ensure not duplicated.

Description

  • In iOS 15, setting isHidden to false on a UIWindow triggers an update to the safeAreaInsets on the view of the window's rootViewController. In iOS 16 (and the 17 beta), this update was not happening. So calculating additionalSafeAreaInsets was happening with safeAreaInsets == .zero instead of the correct value.

Related Issue

N/A

Motivation and Context

There were issues with layout of AccessibilitySnapshot. This led to a detailed investigation of the root cause and this pull request.

Screenshots

Screenshots of debugging the calculation of additionalSafeAreaInsets in SnapshotWindow.swift

iOS 15
iOS15

--

iOS 16
ios16

@a-neuses a-neuses marked this pull request as ready for review August 16, 2023 01:08
Copy link
Member

@ra1028 ra1028 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @a-neuses

@ra1028 ra1028 merged commit 28d3633 into playbook-ui:master Aug 16, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants