Skip to content

Commit

Permalink
Revert "Use fix from other PR pointfreeco#692 and inject `drawHierarc…
Browse files Browse the repository at this point in the history
…hyInKeyWindow` on UIViewController"

This reverts commit 9b16c04.
  • Loading branch information
nlamah committed Aug 17, 2023
1 parent 9b16c04 commit cee6e16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
8 changes: 1 addition & 7 deletions Sources/SnapshotTesting/Common/View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -853,13 +853,7 @@ extension View {
return
}
wkWebView.takeSnapshot(with: nil) { image, _ in
let configuaration = WKSnapshotConfiguration()
if #available(iOS 13, macOS 10.15, *) {
configuaration.afterScreenUpdates = false
}
wkWebView.takeSnapshot(with: configuaration) { image, _ in
callback(image!)
}
callback(image!)
}
}
} else {
Expand Down
3 changes: 1 addition & 2 deletions Sources/SnapshotTesting/Snapshotting/UIViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ extension Snapshotting where Value == UIViewController, Format == UIImage {
/// - traits: A trait collection override.
public static func image(
on config: ViewImageConfig,
drawHierarchyInKeyWindow: Bool = false,
precision: Float = 1,
perceptualPrecision: Float = 1,
size: CGSize? = nil,
Expand All @@ -28,7 +27,7 @@ extension Snapshotting where Value == UIViewController, Format == UIImage {
return SimplySnapshotting.image(precision: precision, perceptualPrecision: perceptualPrecision, scale: traits.displayScale).asyncPullback { viewController in
snapshotView(
config: size.map { .init(safeArea: config.safeArea, size: $0, traits: config.traits) } ?? config,
drawHierarchyInKeyWindow: drawHierarchyInKeyWindow,
drawHierarchyInKeyWindow: false,
traits: traits,
view: viewController.view,
viewController: viewController
Expand Down

0 comments on commit cee6e16

Please sign in to comment.