如何在Swift UI中格式化NavigationView标题?

时间:2020-11-05 02:00:18

标签: swift swiftui swiftui-navigationlink

以下是代码段:

TabView(selection: $selection) {
NavigationView {
        List(0..<N, id: \.self) { index in ... }
        .navigationTitle("Bold Title with leading alignment")
}

如何更改导航视图标题的格式,使其以非粗体显示在最顶部?对于所有其他标签,我使用:

var body: some View {
VStack
{
    Text("ABC").font(.title) <-- centers at the very top with no-bold color
    
    Spacer()
    
    VStack(alignment: .leading) {

0 个答案:

没有答案