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

SwiftUI Wrapper(Page View) refactoring #551

Merged
merged 4 commits into from
Apr 11, 2021

Conversation

PangMo5
Copy link
Contributor

@PangMo5 PangMo5 commented Jan 23, 2021

Currently, PageView cannot save the state of the view due to the view life cycle of SwiftUI. (ex. scroll offset)

I changed the init design of the view to be similar to TabView, and solved the problem by utilizing UIHostingController.

In addition, I wrapped some delegates for personal use.

Added support for the scrollToPosition binding property.

Thanks for providing a good library.

@PangMo5 PangMo5 closed this Jan 25, 2021
@PangMo5 PangMo5 reopened this Jan 25, 2021
@rechsteiner
Copy link
Owner

Thank you so much for this PR 🙌 This looks like a much better API, but I'm a bit worried about using the private @_functionBuilder API. I think we need to wait until Swift has official support for result builders before doing this change.

@PangMo5
Copy link
Contributor Author

PangMo5 commented Feb 1, 2021

Thank you so much for this PR 🙌 This looks like a much better API, but I'm a bit worried about using the private @_functionBuilder API. I think we need to wait until Swift has official support for result builders before doing this change.

Oh I think you are right.
Then apply that part later.

Can only the wrapping part of the delegate be applied?
If possible, I will clean up and commit again.

@rechsteiner
Copy link
Owner

Yes, absolutely!

@PangMo5
Copy link
Contributor Author

PangMo5 commented Feb 2, 2021

It's corrected :D

@rechsteiner rechsteiner merged commit 86396d5 into rechsteiner:master Apr 11, 2021
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.

2 participants