Mastering Swift Foundation Formatter API. Basics

One of the significant additions to the Swift Foundation was the new Formatter API. After almost two years of using it, I apply it in every project, and even more, I try to build my data formatting logic around this API. Today we will learn how to use the new Swift Foundation Formatter APIs.

Dynamic member lookup in Swift

One of my favorite features of the Swift Language is the dynamic member lookup. We don’t use it very often, but it improves the API of the provided type significantly by improving the way we access the data of the particular type.

API availability in Swift

WWDC is coming pretty soon, and we are going to use a bunch of new APIs. But how to use new APIs available only for the latest version of iOS? This week we will learn about availability conditions in Swift.

File importing and exporting in SwiftUI

A few weeks ago, we talked about photo and video picking in SwiftUI. Today we will continue the topic and learn how to import and export files in SwiftUI views. Fortunately, it is straightforward to do with the help of new fileImporter and fileExporter view modifiers.

The power of overlays in SwiftUI

An overlay is a view drawing on top of another view. And today, we will talk about two interesting use cases of using overlays in SwiftUI. One of them allows us to keep the structural identity of the view, and another one becomes very handy whenever you build custom navigation transitions.

PhotosPicker in SwiftUI

Nowadays, many frameworks Xcode provides us contain SwiftUI views, including the PhotosUI framework. The PhotosUI framework provides the PhotosPicker button, allowing us to offer photo-picking functionality in our apps quickly. This week we will learn how to use the PhotosPicker view in SwiftUI.

ImageRenderer in SwiftUI

I work on a medical app where the user needs to export health data rendered using the Swift Charts framework. It was straightforward to achieve by leveraging the power of the new ImageRenderer type. This week we will learn how to use the ImageRenderer type to export SwiftUI view as image or PDF.

Mastering Canvas in SwiftUI

You can draw 2D graphics in SwiftUI using Shape API, but in the end, the framework converts all the shapes into SwiftUI views and render them. This approach has its pros and cons. Fortunately, we can draw rich 2D graphics without combining multiple shapes. This week we will learn how to use Canvas view in SwiftUI.

Drag and drop transferable data in SwiftUI

Last week we discussed the new ShareLink view and the Transferable protocol powering it. The new Transferable protocol is useful for sharing your data from the app, but it also powers drag and drop in your app. This week we will learn how we can drag and drop data conforming to the Transferable protocol in SwiftUI.

Sharing content in SwiftUI

Apple introduced a brand new CoreTransferable framework and ShareLink view in SwiftUI, allowing us to share and export content from our apps very declaratively. This week we will learn how to make data transferable and use the new ShareLink view in SwiftUI.