How to remove the default Navigation Bar space in SwiftUI NavigiationView

后端 未结 15 2743
我在风中等你
我在风中等你 2020-11-29 20:00

I am new to SwiftUI (like most people) and trying to figure out how to remove some whitespace above a List that I embedded in a NavigationView

In this image, you can

15条回答
  •  再見小時候
    2020-11-29 20:11

    SwiftUI 2

    There is a dedicated modifier to make the navigation bar take less space:

    .navigationBarTitleDisplayMode(.inline)
    

    There's no longer need to hide the navigation bar or set its title.

提交回复
热议问题