Hi
I have a TabView and I would like a background image to cover the full screen. Here is the code I'm struggling with:
struct ContentView: View {
var body: some View {
ZStack {
Image("background-image")
.resizable()
.scaledToFill()
.edgesIgnoringSafeArea(.all)
TabView {
AssetsView()
.tabItem {
Label("Assets", systemImage: "books.vertical.fill")
}
FavouriteView()
.tabItem {
Label("Favourite", systemImage: "star.fill")
}
}
}
}
No matter what I try, I can't seem to get my "background-image" to display. I thought I might just have the background image only on AssetsView
but that wasn't successful either.
Any ideas would be appreciated.