I'm having an issue with navigationBarItems and list.
If I add a navigationBarItems, my list is moved slightly to the right (red line). When I remove the navigationBarItems, the list begins on the blue line.
Is this a normal thing? What am I doing wrong?
struct ContentView: View {
var body: some View {
NavigationView {
List {
Text("Item 1")
Text("Item 2")
Text("Item 3")
Text("Item 4")
}
.navigationTitle("Home")
.navigationBarItems(trailing:
NavigationLink(destination: EmptyView()) {
Image(systemName: "plus.circle.fill")
})
}
}
}