[ad_1]
I am attempting to make use of a VStack with two Textual content objects for a centred title. It seems to be one thing like this:
Once I go to a subView after which return, it seems to be the identical for a second however then an obscuring bar seems throughout the highest of the higher Textual content merchandise like this:
This code demonstrates the issue.
import SwiftUI
struct ContentView: View {
var physique: some View {
NavigationView {
NavigationLink("Go to Second View", vacation spot: SecondView())
.toolbar {
ToolbarItem(placement: .principal) {
VStack {
Textual content("Title Title Title").font(.title).daring()
Textual content("Subtitle").font(.subheadline).padding(.backside)
}
}
}
}.navigationBarTitleDisplayMode(.inline)
}
}
struct SecondView: View {
var physique: some View {
Textual content("Second View")
}
}
I’ve tried shifting the .displayMode round and tried the totally different modes however I need to hold the NavigationView because the extra compact .inline model. In need of an answer I will need to rethink, thanks.
[ad_2]


