Closed ctopher7 closed 1 week ago
Sorry for the trouble!
When building your code, you get a warning something to the effect of "Skip cannot determine whether this expression results in a View. Consider specifying your types explicitly". That's a hint that the problem is not with the labels, but with Skip's type inference.
If you change the "BottomTabData.page" property to be of type AnyView (removing the generic T), or if in your ForEach you cast to AnyView (i.e. "(data.page as AnyView).tabItem { ... }"), then it works.
Again, apologies for the trouble, but I hope these simple workarounds get you back on track.
@aabewhite your workaround solves the issue, thank you!
Hi, I'm trying to create a tabview but it doesn't show any label on Android (but I think the background color of the bottom tab is showed) my env:
public struct ContentView: View { @State private var selection = 0
}
fileprivate struct BottomTabData{
let page: T
let name: String
let imageName: String
let imageNameChosen: String
}