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...

Reading time: 8 min

This recipe shows how to format content of a SwiftUI Text with HTML via NSAttributedString on any SwiftUI version. The end result looks like this:

Screenshot%202021-05-26%20at%2014.24.29

There are two solutions in this recipe:

  1. SwiftUI 3 (iOS 15, macOS 12) brings in a new AttributedString wrapper around NSAttributedString...

Continue Reading...

Reading time: 1 min

This recipe shows how to implement a Pager View using a TabView in SwiftUI. This is an awesome addition in iOS 14.0, allowing you to trivially create a swipeable pager.

The end result looks like this:

ezgif-2-74be83381405

We already have a recipe for Pager / Swiper view in SwiftUI that also works on iOS 1...

Continue Reading...