Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Style the NavigationBar Title in SwiftUI
struct MyView: View {
var body: some View {
VStack {
Text("Hello World")
}
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .principal) {
HStack {
Image(systemName: "sun.min.fill")
Text("My Title")
.font(.headline)
.foregroundColor(.white)
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.