I've got a SwiftUI Navigation View and the content views inside have a very small amount of space between the navigation bar and the content. Here's my code:
struct TestView: View {
var body: some View {
ZStack(alignment: .top) {
NavigationView {
List {
Section(header: Text("Section Header")) {
NavigationLink(
destination: CustomDeckView(),
label: {
Text("A link")
.foregroundColor(AppTheme.Colors.text)
})
.preferredColorScheme(.light)
}
}
.listStyle(InsetGroupedListStyle())
.navigationBarTitleDisplayMode(.inline)
}
.navigationViewStyle(StackNavigationViewStyle())
Text("Custom Font")
.font(.custom("Pacifico-Regular", size: 27.5))
.offset(y: -5)
}
}
}
This is what it looks like in the app preview: