Skip to content

fix(ios): additional safe area insets were miscalculated if already set - #9991

Merged
NathanWalker merged 2 commits into
NativeScript:mainfrom
CatchABus:ios-rotation-insets-fix
Aug 10, 2022
Merged

NathanWalker merged 2 commits into
NativeScript:mainfrom
CatchABus:ios-rotation-insets-fix

Conversation

@CatchABus

@CatchABus CatchABus commented Aug 10, 2022 •

Copy link
Copy Markdown
Contributor

PR Checklist

What is the current behavior?

During additional safe area inset calculation, view controllers also included the old additional safe area inset values. Subtracting them from currentInsetsTop and currentInsetsTop helps calculate proper values for additional insets and fixes problems like tabs infinite loop during rotation.

See #9931 for more details by @dgmachado. He has provided a sample and precious information.

What is the new behavior?

Application will properly calculate insets and operate normally after rotation without problems.

Fixes #9931 #8339

@cla-bot cla-bot Bot added the cla: yes label Aug 10, 2022
@CatchABus
CatchABus marked this pull request as draft August 10, 2022 15:49
@dgmachado

Copy link
Copy Markdown
Contributor

I've tested this solution in different apps using iOS simulators: iphone 8, 12 and 13 and 13 Pro and it's working properly. I did a lot of stress test and could not reproduce the issue again. The unit tests are all passing.

@CatchABus
CatchABus marked this pull request as ready for review August 10, 2022 20:56
@NathanWalker
NathanWalker merged commit be6efc3 into NativeScript:main Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants