-
Notifications
You must be signed in to change notification settings - Fork 576
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trait Overrides support for iOS 17 #798
Comments
AllDmeat
changed the title
Wrong size for views with non-default preferredContentSizeCategory at iOS 17
Trait Overrides support for iOS 17
Dec 1, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
We were using SnapshotTesting for testing Dynamic Type with views being autosized using
systemLayoutSizeFitting
. Similar strategy can be found at #727.This year Apple updated trait system at iOS 17. You can learn more at WWDC'23 session Unleash the UIKit trait system.
Traits are now applied only after the view has been added to the view hierarchy, rather than before.
At the same time, the SnapshotTesting library continues to request the view size before it is added to the hierarchy. Because of these two behaviors, we have a conflict and cannot test Dynamic Type with autosizing views.
To Reproduce
SnapshotDemo.zip
Expected behavior
Size is being requested after the view is added to the view hierarchy and all
traitOverrides
are applied.Environment
The text was updated successfully, but these errors were encountered: