Create an Inset Grouped List in SwiftUI for macOS

Luca Jonscher
2 min readAug 7, 2020

When you have an iOS app, especially when it displays information, you maybe use InsetGroupedListStyle on your List . This looks any like this:

iPad, Info from mactracker.ca

But there is a problem, when you want to display this view on macOS. InsetGroupedListStyle is unavailable for native apps (It’s available for Mac Catalyst though). And when you use alternative list styles for the list, it looks like this:

Mac

It doesn’t look that bad, but it is not consistent with the iOS app design.

Creating the view extension

There isn’t a way to create a custom ListStyle . So we create a view extension , that we can use on the sections.

--

--

Luca Jonscher

Designer, Developer, Creative. Freelance graphic designer. From Germany. Thrice Apple Swift Student Challenge winner.