Reading time: 1 min

This recipe shows how to display a grouped list in SwiftUI. A grouped list contains sections, comprised of zero or more rows, plus an optional header and footer.

The end result will look like this:

grouped-insets

OK, so the formula is quite simple:

  1. Pass Sections as your List's items.
  2. Specify...

Continue Reading...

Reading time: 2 min

This recipe shows how to style SwiftUI DatePicker by setting its background and foreground / text color. There's no good, standard way of doing this, but a few tricks can get you there for the most part.

Here are a few examples of what you can do:

Graphical dialog Wheel dialog
Compact dialog Custom buttons

The images above show...

Continue Reading...

Reading time: 2 min

This recipe shows how to implement a custom separator/divider in any SwiftUI list feeded by a ForEach - like VStack, LazyVStack, HStack, LazyHStack, etc. The end result looks like this:

ezgif-2-c66ddfeec0a2

The gist of the recipe is to implement a custom ForEach that inserts separators between items. It...

Continue Reading...

Reading time: 8 min

This tutorial shows how to use the SwiftPaging framework to seamlessly integrate a paged data source in your app. You'll learn how to fetch paged data from a remote API and display it in an infinite scrolling list. After that, you'll add a database layer that allows for persistent storage of pag...

Continue Reading...

Reading time: 4 min

This recipe shows how to implement infinite scrolling list in SwiftUI. The result code is a single view, that can be used just like any other List. It renders data from a collection via a ViewBuilder and triggers loading when the list is scrolled to the bottom.

The result looks like this:

...

Continue Reading...