When Apple launched SwiftUI in 2019, it was an exciting new way to build the user interface for your app, but it many people found it buggy, and restricted to fairly simple apps. In the last three years Apple have extended the capability of SwiftUI, and also made it easier to use.
05-07-2023
In their Apple Worldwide Developers Conference last month, Apple revealed the latest refinements to SwiftUI, justifying the claims of Apple Senior Developer Josh Shaffer: "The best way to build modern user interfaces across all Apple platforms is with SwiftUI. SwiftUI lets you write better apps with less code so you can focus on what's unique to your app. It also maximizes your ability to reuse interface code."
The key additions to SwiftUI this summer are:
Simplification of the interaction between SwiftUI code and data - the new @Observable macro makes the link between data and SwiftUI code much easier to understand and use.
Provision of low effort data modelling and persistence with the @Model macro.
Better support for drawing maps with much stronger integration with MapKit facilities.
More powerful animations, with simpler defaults, and aa new API for building complex animations.
Fixes for many of the issues people had raised with earlier releases of SwiftUI.
All of these improvements are on top of the key benefits that made Apple introduce SwiftUI in the first place:
Clearer split between control code and UI code.
Significant reduction in code written for many apps.
Improved accessibility through automatic integration of features such as dynamic type and dark type.
Much simpler and more powerful lists and tables.
Excellent support for cross-platform development.
Just as it was sensible to wait several years after the launch of Swift before switching your team from Objective-C, the bleeding edge nature of SwiftUI had meant it was not ready for serious deployment. Those days are past us - "The best way to build modern user interfaces across all Apple platforms is with SwiftUI."
So if you've come here from our "Should I use SwiftUI or UIKit in 2022?" blog, hopefully this will help you make up your mind if you're asking yourself "Should I use SwiftUI or UIKit in 2023?"
We use cookies on our website to provide you with the best user experience. If you're happy with this please continue to use the site as normal. For more information please see our Privacy Policy.