-
Hey all, Firstly wanted to say thanks for your work on the library, it's proven super useful so far. I'm using
This works beautifully... until a detail view gets presented when clicking on a list item. When this happens it appears that the backgrounds reappear: How do I introspect the detail views to remove their backgrounds as well? I have tried introspecting NavigationSplitView in the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thanks for your question, @slaght. Indeed, setting Here's what I came up with: https://github.com/davdroman/NavigationSplitViewRemoveBackgrounds Note I took the liberty to drop in a Let me know what you think. |
Beta Was this translation helpful? Give feedback.
Thanks for your question, @slaght.
Indeed, setting
backgroundColor
s via introspection is flakey. SwiftUI insists on overriding the background color of its UIKit components on each state update. However, I'm not convinced this is necessarily a problem begging for introspection, as nowadays SwiftUI offers modifiers to clear out a number of backgrounds. Instead, a hybrid approach might be best.Here's what I came up with:
https://github.com/davdroman/NavigationSplitViewRemoveBackgrounds
Note I took the liberty to drop in a
.navigationTransition(.slide)
modifier from my https://github.com/davdroman/swiftui-navigation-transitions library to make the transition smoother, because the default iOS…