Skip to content

Commit

Permalink
use scene
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelhenry committed Jun 28, 2024
1 parent 048e517 commit 62dd508
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Demo/DemoTests/Helpers/Snapshotting+WindowImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ extension Snapshotting where Value: UIViewController, Format == UIImage {
Snapshotting<UIImage, UIImage>.image(precision: precision).asyncPullback { vc in
Async<UIImage> { callback in
UIView.setAnimationsEnabled(false)
let window = UIApplication.shared.windows[0]
guard let window = UIApplication.shared.connectedScenes.compactMap({ $0 as? UIWindowScene }).first?.windows.first else { return }
window.rootViewController = vc
action()
DispatchQueue.main.async {
Expand Down

0 comments on commit 62dd508

Please sign in to comment.