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

Page control doesn't scroll content #4

Open
Xabchinsk opened this issue Feb 27, 2023 · 3 comments
Open

Page control doesn't scroll content #4

Xabchinsk opened this issue Feb 27, 2023 · 3 comments

Comments

@Xabchinsk
Copy link

If you scroll section content, page control updates normally. But if tap page control directly and change active page - nothing happens.

@nemecek-filip
Copy link
Owner

@Xabchinsk hello! Yes this is expected behavior atm. To implement this, you would need to catch the page control page change event, construct IndexPath and ask the collection view to scroll it into view.

Wanna try opening PR for this? :-)

@Xabchinsk
Copy link
Author

I'm figured out this in my project, just want to make a notice here. Unfortunately, can't achieve desired result using Combine for some reasons, so, implement via old school target \ action, and this solution looks ugly for your project, imho :)

@nemecek-filip
Copy link
Owner

I think the "old school" is great if it gets the job done! Tbh the Combine solution for this isn't ideal, I believe since iOS 15 or so there is dedicated method you can call to request collection view reload the header/footer views without reloading the rest. Just did not have time to change it yet

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

No branches or pull requests

2 participants