Search code examples
xcodeswiftuiswiftui-listxcode12

Why doesn't my list view load instantly in Xcode-12-Beta?


When using the List View in SwiftUI, it doesn´t render properly. When using the simulator, it works just fine, so I only get the behavior when using on device testing.

Has anyone else seen this and knows how to fix it?

This is the behavior I get

Btw I´m totally new to this, so please be nice ;)


Solution

  • I suspect you just need to add a listStyle to your list. For example

    List {
       ...
    }.listStyle(InsetGroupedListStyle())