how to add a navigation bar programtically in swift code example
Example: add navigation bar button swiftui
.navigationBarItems(
leading: Button(action: {
// Actions
}, label: { Text("Button") }),
trailing: Button(action: {
// Actions
}, label: { Image("Icon") })
)