Posts

Post not yet marked as solved
5 Replies
In that example, are you able to affect changes to the NavigationBar of the enclosing NavigationView? That's the root of the problem I'm having. I can get the theme to propagate to most views in the app, but can't seem to make the existing NavigationBars update. If a given modal is dismissed and reopened, it picks up the new theme, but that doesn't help the ones that are on the screen at the time of change, and nothing short of killing and restarting the app seems to cause the MainView's NavigationBar to invalidate. It's worth noting that I'm using UINavigationBar's appearance proxy to set the nav bar styling. I'm guessing this isn't playing nicely with the SwiftUI view lifecycle, but I can't figure out any other way to style the nav bars.
Post not yet marked as solved
5 Replies
I should have been clearer. Storage of the theme preference isn't an issue (user data, including the theme choice, is stored in a separate persistent storage container). It's how to trigger the invalidation and redrawing of the entire App UI (all views) on the change.
Post marked as solved
2 Replies
That doesn't really answer my specific question, but I'm inclined to give you the checkmark because it eventually led me to catch the real problem, which was that I was attaching my fullScreenCover to the NavigationView, not the contents of the NavigationView. However, for anyone else trying to do this, it's critical to note that simply putting a fullScreenCover over the app contents isn't enough. Because the fullScreenCover is animated. This means that all someone has to do to see the main screen of the app for a moment (long enough to read some content!) is kill the app and restart it. Anyone know of a way to tell fullScreenCover to not animate?
Post not yet marked as solved
8 Replies
No, the thread isn't closed... I don't have an answer to my question, which is specifically about how to achieve this layout using the "new way": UICollectionViewCompositionalLayout.What I did was create a custom UICollectionViewLayout subclass, the "old way".
Post not yet marked as solved
8 Replies
I went ahead and implemented the custom UICollectionViewLayout subclass and achieved what I need.The intent is a single "page" which scrolls as a single view, but with content arranged in sections as described.
Post not yet marked as solved
8 Replies
Sorry, this isn't what I'm after. I want a single collection view laying out sections side-by-side (when width allows) and that can collapse to a more traditional top-to-bottom stack of sections in a horizontally compact layout (like iPhone). Trying to simulate this with two collection views would cause way more problems that it sovles.This is doable using a custom UICollectionViewLayout subclass which I normally would have used, but I was hoping the "new exciting" layout mechanisms would make this easier, but it appears to me that UICollectionViewComposableLayout isn't capable of putting sections side-by-side.