Folks, I'm having a hard time understanding why adding the .navigationTitle modifier to a NavigationView doesn't work. Why does it need to be added to a (group of) view(s) in that NavigationView? That doesn't make sense to me at all...
What am I missing here?
What am I missing here?
NavigationView is a container for other views; it starts by showing its child view - the root view in the navigation stack - and the user can use NavigationLinks to navigate to second view, which will be shown inside the same parent NavigtionView.
So it's the child's responsibility to provide content to display - and that includes the title.
So it's the child's responsibility to provide content to display - and that includes the title.