pointfreeco / swift-snapshot-testing

📸 Delightful Swift snapshot testing.
https://www.pointfree.co/episodes/ep41-a-tour-of-snapshot-testing
MIT License
3.74k stars 570 forks source link

Provide a Snapshotting strategy using `UIView.systemLayoutSizeFitting` #727

Open oconnelltoby opened 1 year ago

oconnelltoby commented 1 year ago

This allows constraining a view in one axis, whilst allowing the other to resize. This is particularly useful when snapshotting views with text in as to support accessibility text should wrap when it cannot fit horizontally.

AllDmeat commented 10 months ago

iOS 17 changed how traits are applied: trait overrides are applied only after view is already added to the view hierarchy. You are requesting view size before it's being added to the hierarchy. Do you have an updated implementation to support Dynamic Type testing on iOS 17?

You can learn more at WWDC'23 session Unleash the UIKit trait system