diff --git a/Sources/SnapshotTesting/Snapshotting/UIViewController.swift b/Sources/SnapshotTesting/Snapshotting/UIViewController.swift index b08b8bf59..f9ec226a7 100644 --- a/Sources/SnapshotTesting/Snapshotting/UIViewController.swift +++ b/Sources/SnapshotTesting/Snapshotting/UIViewController.swift @@ -20,6 +20,7 @@ /// - traits: A trait collection override. public static func image( on config: ViewImageConfig, + drawHierarchyInKeyWindow: Bool = false, precision: Float = 1, perceptualPrecision: Float = 1, size: CGSize? = nil, @@ -34,7 +35,7 @@ snapshotView( config: size.map { .init(safeArea: config.safeArea, size: $0, traits: config.traits) } ?? config, - drawHierarchyInKeyWindow: false, + drawHierarchyInKeyWindow: drawHierarchyInKeyWindow, traits: traits, view: viewController.view, viewController: viewController