Skip to content

fix(ios): ensure view layout when using large titles - #10044

Merged
NathanWalker merged 3 commits into
mainfrom
fix/safe-area-layout-issue
Nov 2, 2022
Merged

NathanWalker merged 3 commits into
mainfrom
fix/safe-area-layout-issue

Conversation

@edusperoni

Copy link
Copy Markdown
Contributor

PR Checklist

What is the current behavior?

When using large titles with a listview, you'll be unable to scroll up and reveal the large title due to us recalculating the layout on viewDidLayoutSubviews only, constatly glitching while scrolling to top.

This happens because iOS will NOT call viewDidLayoutSubviews in those scenarios, only viewSafeAreaInsetsDidChange, so there's a size mismatch and the glitch happens

What is the new behavior?

We now recalculate the layout when safe area insets change. ListView and ScrollView users might still want to use iosIgnoreSafeArea to avoid costly layout recalculation as those views' sizes are mostly managed by iOS once large titles are enabled.

@cla-bot cla-bot Bot added the cla: yes label Sep 30, 2022
@NathanWalker NathanWalker added this to the 8.4 milestone Nov 2, 2022
@NathanWalker
NathanWalker merged commit d625141 into main Nov 2, 2022
@NathanWalker
NathanWalker deleted the fix/safe-area-layout-issue branch November 2, 2022 19:22
@CatchABus

Copy link
Copy Markdown
Contributor

@NathanWalker This one has 2 review requests. I believe they should be looked into.

@NathanWalker

Copy link
Copy Markdown
Contributor

@CatchABus possible to link to those? Don't see them here.

@CatchABus CatchABus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please let me know what you think about those.

Comment thread packages/core/ui/page/index.ios.ts Resolved
Comment thread packages/core/ui/page/index.ios.ts Resolved
edusperoni added a commit that referenced this pull request Nov 9, 2022
Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com>
NathanWalker added a commit that referenced this pull request Nov 9, 2022
Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com>
farfromrefug added a commit to Akylas/NativeScript that referenced this pull request Mar 23, 2023
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