Post

Replies

Boosts

Views

Activity

Reply to Ornament Toolbar disappears
It seems to be because TabView doesn't call the view again. It remains in the background along with its state. When I use NavigationStack the toolbar reappears because the whole view is called again. TabView does not do this and instead seems to just hide the view. TabView should redraw the view when you change tabs. Not sure why it behaves this way as seems like an anti-pattern compared to how the rest of SwiftUI works. I just tried to make TabView redraw the main view with an .id modifier but then it just causes the whole app to crash. Guessing this is a bug that will be ironed out as most of the native apps use the TabView along with ornaments. I will raise this with feedback as suggested.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’23