UIKit now integrates Swift observation

Asked on 06/16/2025

1 search

UIKit now integrates Swift observation at its core, allowing for automatic tracking of observable objects in update methods like layoutSubviews. This integration means that UIKit can automatically track any observable view reference, wire up dependencies, and invalidate the right views without requiring manual intervention. This feature is enabled by default in iOS 26, but you can back-deploy it to iOS 18 by adding the UIObservationTrackingEnabled key to your Info.plist. For more details, you can refer to the session What’s new in UIKit (10:21).