@Accessibility inspector font We had the same issue, but discovered that when built with the iOS 17 SDK, only views that are part of the view hierarchy and have had a layout pass will have their trait collections properly updated. After updating the tests to 1. Set the overrideUserInterfaceStyle, 2. Add the view to the test hosts view hierarchy and, 3. Calling setNeedsLayout/layoutIfNeeded on the view would the traitCollection be properly updated. This view layout pass requirement is mentioned in a WWDC 23 video.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: