rechsteiner / Parchment

A paging view with a highly customizable menu ✨
MIT License
3.35k stars 417 forks source link

Propagate .options changes when SwiftUI View is updated #697

Closed nfgrilo closed 6 months ago

nfgrilo commented 7 months ago

Currently, when the View holding the PageView has changes and need refresh, PageView modifiers changes are not propagated to UIKit (but SwiftUI contents inside Page are 👍🏼).

My use case is that I support custom themes on my app, and everything is correctly updated except for the menu items.

I have attached three patches (4.0 branch):

0001-Added-changes-to-DefaultView-to-exemplify.patch 0002-Propagate-.options-modifiers-on-View-updates.patch 0003-Fixed-.indicatorStyle-not-being-respected.patch

I would be very grateful if you could give a try and have a look!

nfgrilo commented 7 months ago

If you find useful, I can create a PR from my fork https://github.com/nfgrilo/Parchment/tree/4.0

rechsteiner commented 6 months ago

Thank you so much for the detailed issue and fix! I really appreciate it 🙌 The patches you provided look great. Feel free to create a PR from your fork, although we can probably skip the DefaultView changes.

nfgrilo commented 6 months ago

Thanks! I've created a PR with a single commit here: https://github.com/rechsteiner/Parchment/pull/703

Great work ❤️