Reading time: 3 min

This recipe provides a drop-in replacement for iOS 15 AsyncImage. This allows you to load images from remote sources on any SwiftUI version, with the code being exactly the same (minus the Compat at the end of name :]). The end result looks like this:

preview

AsyncImage and AsyncImageCompat bot...

Continue Reading...

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: 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: 1 min

This tutorial shows how to use SVG images in SwiftUI.

First, add the Macaw library to your project. Then, wrap its SVGView using this simple UIViewRepresentable wrapper:

import Macaw

struct SVGImage: UIViewRepresentable {
  // a binding allows for dynamic updates to the shown image
  @B...

Continue Reading...

Reading time: 1 min

This tutorial shows how to customize the navigation bar buttons as images. It applies to both the back button, as well as the button on the right-hand side. The end result will look something like this:

Customized navigation bar buttons

To do so, use the navigationBarItems(leading:trailing) method. As always, the navigation...

Continue Reading...