SwiftUI Weekly - Issue #53
The curated collection of links about SwiftUI. Delivered every Monday.
The Apple Worldwide Developers Conference is coming to a screen near you, June 7 to 11. Join the worldwide developer community for an all-online program with exciting announcements, sessions, and labs at no cost. You’ll get a first look at the latest Apple platforms, tools, and technologies — so you can create your most innovative apps and games yet.
As I’ve been working with SwiftUI, I’ve come up with some custom property wrappers that I want to share with you. Most of these are property wrappers that can be easily accomplished using other approaches, but I like these for their expressivity.
In the previous post, I shared how you can create custom property wrappers that will work with SwiftUI’s view updating mechanism. I wrote that because I’ve got one other neat property wrapper to share, but understanding how it works requires knowing how to make custom wrappers.
One performance tip that the SwiftUI team has given us during last year’s WWDC is to make views initializers as light as possible: this is because our views can be created and destroyed multiple times every second.
Starting in iOS 14, SwiftUI provides its own text view called TextEditor. Find out how to use it and get around specific peculiarities easily.
ScrollViewReader is one of my favorite features in the new version of SwiftUI. It allows you to easily to make a scrollview to scroll to a particular location.
Two months ago, I started an experiment of building a non-trivial production-ready app targeting all Apple platforms using only SwiftUI. It was an incredibly fun and challenging experience, but part of the journey is the end. The goal of this post is to provide a glimpse of how it was done.
In SwiftUI, we don't have an equivalent view that matched the power of NSAttributedString, but we got something similar. SwiftUI offers a simple and easy way to build text with different attributes. We do it by concatenates the different text views together.
PureSwiftUI is a Swift package designed to enhance the experience of writing SwiftUI code. An additional goal is to make these changes as intuitive as possible, requiring little to no experience with the package to begin using its advantages in ernest.
Error Handling in SwiftUI - The Matthias iOS Development Show