Reading time: 1 min

This recipe shows how to add an image picker to your SwiftUI app. You'll do this by wrapping a UIKit UIImagePickerController in a UIViewControllerRepresentable. The end result looks like this:

Preview

This recipe is a part of our Road to DigitalSignatureView series, which explores various co...

Continue Reading...

Reading time: 1 min

This recipe shows two ways of detecting when your app goes to foreground or background.

NotificationCenter solution

The first solution works on iOS 13+ and any device, iPhone or iPad, and is generally the one you should use. First, add these two extensions to your app:

extension View {
  f...

Continue Reading...

Reading time: 4 min

This recipe shows how to render GIFs in SwiftUI. The end result looks like this:

Preview iOS

This component is available as a Swift package in this repo.

GIFs are a weird animal in the iOS/macOS world - while CoreGraphics contain ways of extracting GIF-related info from raw data, there's no na...

Continue Reading...

Reading time: 4 min

This recipe shows how to embed a WKWebView into SwiftUI and have a (somewhat) functional browser in your app! The end result looks like this:

Preview iOS

This component is available as a Swift package in this repo.

Modelling the behaviour

WKWebView is a powerful and intricate component that d...

Continue Reading...

Reading time: 3 min

This recipe shows how to customize a Progress view by implementing a custom ProgressViewStyle. You'll implement a circular progress bar that supports both definite and indefinite progress. The end result will look like this:

Preview

Progress view and ProgressViewStyle were introduced in SwiftU...

Continue Reading...