I'm very new to Xcode and SwiftUI and I was wondering if anybody knows how to add multiple navigationBarTitle
in SwiftUI such as the one I found in Apple news. I wanna be able to add my main title for the page but then also supply like a date. Would love any suggestions someone has thank you :)
Asked
Active
Viewed 943 times
1

Luke
- 105
- 7
-
Seems a similar question https://stackoverflow.com/questions/59825965/swiftui-multiline-text-in-a-navigationview-title – SamB Oct 12 '21 at 06:38
1 Answers
0
Navigation bar in SwiftUI can be customized. Use code like below:
NavigationView {
Text("Hello, world!")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .navigationBarLeading) {
VStack {
Text("Title").font(.largeTitle)
Text("Subtitle").font(.subheadline)
}
}
}
}

Turtleeeeee
- 171
- 7