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

Eric/uikit scroll to section #1789

Merged
merged 2 commits into from
Feb 22, 2025
Merged

Eric/uikit scroll to section #1789

merged 2 commits into from
Feb 22, 2025

Conversation

EricBAndrews
Copy link
Member

Issues

Description

Replaces the SwiftUI-based index scrolling with a UIKit/introspection-based implementation that uses UICollectionView.scrollTo to perform scrolling.

Since we already have a custom scroll-to-top implementation on this view anyway, I also use the UIKit approach to handle that and have ripped out the ScrollViewReader altogether.

Implementation Notes

Setting the scroll target to .top puts it a little too at the top (and trying to fix it with edge insets on the UICollectionView makes the top insets bad), I've set the scroll target to .verticallyCentered.

@EricBAndrews EricBAndrews requested a review from a team as a code owner February 22, 2025 03:37
@EricBAndrews EricBAndrews requested review from Sjmarf and removed request for a team February 22, 2025 03:37
Copy link
Member

@Sjmarf Sjmarf left a comment

Choose a reason for hiding this comment

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

Nice work! 🚀

@EricBAndrews EricBAndrews merged commit f66f328 into dev Feb 22, 2025
2 checks passed
@EricBAndrews EricBAndrews deleted the eric/uikit-scroll-to-section branch February 22, 2025 16:12
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.

Susbcription list breaks when scrolling fast using index letters
2 participants