Skip to content

fix: default to drawHierarchy rendering when available #996

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ajkolean
Copy link

@ajkolean ajkolean commented Jun 4, 2025

Resolves rendering issues (#606, #790) caused by layer.render(in:) no longer matching runtime visuals on iOS 17+. This change uses drawHierarchyInKeyWindow: true when safe (e.g. SwiftUI + key window), preserving CI stability while improving snapshot fidelity.

@mattmapadmi
Copy link

We've found with drawInHierarchy we get very unstable tests. Some of it is changes we need to make (like disabling cross-fade animations), but then there's lots of really odd single-pixel changes.

image

We're using ScreenshotBot for diffs, which by default doesn't have any leniency for miniscule changes.

We'll switch the rendering mode to .disabled and accept our rounded rectangles will be wrong (#606), but this PR might be a surprise for some consumers of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants