SwiftUI Weekly - Issue #110
The curated collection of links about SwiftUI. Delivered every Monday.
Reading
Bottom sheet API in SwiftUI
Two years ago, I wrote a post about building a custom bottom sheet in SwiftUI. Nowadays, there is no need to make it manually, at least if you don’t need a super custom behavior. SwiftUI introduces a new API to display a bottom sheet in a few lines of code. This week we learn the new API allowing us to present bottom sheets in different appearances.
Mastering LabeledContent in SwiftUI
One of the new SwiftUI views released during WWDC22 was LabeledContent. And it became one of my favorite views that I try to use everywhere because it fits very well into Human Design Guidelines. This week we will learn how to use LabeledContent to provide a platform-oriented experience.
SwiftUI Split View Configuration
How to configure the column visibility, width and style of a SwiftUI NavigationSplitView.
Customizable toolbar on iPad in SwiftUI
Let users configure the visible items in the center area of the toolbar on iPadOS 16 to suit their personal workflows.
New way to control number of lines of SwiftUI Text in iOS 16
In iOS 16, we got a big improvement over lineLimit modifiers. Let's see what we can do with it.
Code
swift-unidirectional-flow
Unidirectional flow implemented using the latest Swift Generics and Swift Concurrency features.
Video
Size Classes in SwiftUI
Size classes help us determine which device our user is on as well as the orientation of that device. In SwiftUI, we use environment variables to access size class information and adapt our UI accordingly. In this video, I show an example of adjusting landscape and portrait on an iPhone in SwiftUI.