UIKit integrates Swift observation

Asked on 06/16/2025

2 searches

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 the need for manual intervention. This feature is available by default in iOS 26 and can be back-deployed 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).