@Observable class properties with no initial values
Asked on 03/05/2025
1 search
In the context of SwiftUI and observable classes, the session titled "SwiftUI essentials" discusses how SwiftUI manages state and dependencies. Specifically, it mentions the use of observable classes to track changes in data and update views accordingly. SwiftUI creates dependencies to the specific properties used in view bodies, and it has tools for state management, such as @State
and @Binding
.
If you are dealing with @Observable
class properties with no initial values, you might need to ensure that these properties are properly initialized before they are accessed in your views. SwiftUI relies on these properties to determine when to update the UI, so having uninitialized properties could lead to runtime errors or unexpected behavior.
For more detailed information on managing state and dependencies in SwiftUI, you can refer to the session SwiftUI essentials (09:43).

Extend your app’s controls across the system
Bring your app’s controls to Control Center, the Lock Screen, and beyond. Learn how you can use WidgetKit to extend your app’s controls to the system experience. We’ll cover how you can to build a control, tailor its appearance, and make it configurable.

Swift Charts: Vectorized and function plots
The plot thickens! Learn how to render beautiful charts representing math functions and extensive datasets using function and vectorized plots in your app. Whether you’re looking to display functions common in aerodynamics, magnetism, and higher order field theory, or create large interactive heat maps, Swift Charts has you covered.

Explore Swift performance
Discover how Swift balances abstraction and performance. Learn what elements of performance to consider and how the Swift optimizer affects them. Explore the different features of Swift and how they’re implemented to further understand the tradeoffs available that can impact performance.