I am trying to add a space between the toolbar on top and the first element. I am not able to find any docs or links to do it.
Current code:
import SwiftUI
struct AnotherView: View {
var body: some View {
let words = ["Nakul", "Chawla"]
VStack {
VStack{
Text("lets see if this works")
}
.navigationTitle("Hawaii")
.toolbar {
Text("something else")
}
.toolbarBackground(.yellow, for: .navigationBar)
.toolbarBackground(.visible, for: .navigationBar)
.navigationBarTitleDisplayMode(.inline)
VStack {
Spacer()
MiniView()
Spacer()
Spacer()
Spacer()
List(words, id: \.self) { word in
Text(word)
}
}
}
}
}
How can I separate the view from the toolbar in yellow and the other elements of my view.