I have built a popup view with two tabs, each containing a form. I want to give each form a title and all the online documentation points to wrapping each form within a NavigationView and using .navigationBarTitle("Form Title"). However, when I build this for the iPad it ends up with back button to get to the form within the tab. Such as this:
and this:
var body: some View {
NavigationView {
Form {
Section(header: Text("Question")) {
TextField("Question Title", text: $title)
TextField("Question Detail", text: $detail)
TextField("Word Count", text: $wordCount)
}
Section {
Button("Save") {
let newQuestion = ApplicationQuestion(context: self.moc)
newQuestion.title = self.title
newQuestion.detail = self.detail
newQuestion.wordCount = self.wordCount
try? self.moc.save()
self.presentationMode.wrappedValue.dismiss()
}
}
}
}
.navigationBarTitle("Full Screen")
}
What is the correct way of implementing this?


You have to apply the
navigationBarTitlemodifier to the view inside of theNavigationView. In this example to theFormitself.