I have a very simple view, a background color and some text. But when I wrap it in a NavigationView I'm getting unwanted spacing at the top of the view. How can I eliminate this? (I want the Navigation as I will be adding NavigationLinks)
e.g.
var body: some View {
NavigationView {
ZStack(alignment: .leading) {
Rectangle()
.fill(
LinearGradient(
gradient: Gradient(colors: [.indigo, .purple]),
startPoint: .bottom,
endPoint: .top
)
)
.ignoresSafeArea()
VStack {
Text("Test")
Spacer()
}
}
}
}