FB21365706
It looks like the tabViewBottomAccessory view doesn’t adapt properly when the background isn’t white. Interestingly, the tab bar itself adapts perfectly.
struct ContentView: View {
enum TabValue: String {
case first, second
}
@State var selectedTab: TabValue = .first
var body: some View {
TabView(selection: $selectedTab) {
Tab("first", systemImage: "1.circle", value: .first) {
ScrollView(.vertical) {
Spacer(minLength: 800)
LinearGradient(
colors: [.yellow, .black],
startPoint: .top,
endPoint: .bottom
)
.frame(height: 800)
}
}
Tab("second", systemImage: "2.circle", value: .second) { }
}
.tabViewBottomAccessory {
HStack {
Text("Title")
Spacer()
Image(systemName: "play.fill")
}
.padding(.horizontal)
}
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI