We tried to extend the function in our project but got errors because snapshotView is private!
Use case:
Noticed other methods similar to this one had the drawHierarchyInKeyWindow parameter. For our use case we are using UIViewControllers as containers to SwiftUI views that contain UIVisualEffects. Without this parameter the UIVisualEffect would appear transparent in the snapshots.
What does this Pull Request do?
Adds the
drawHeirarchyInKeyWindow
parameter to theimage
method inUIViewController.swift
file.We tried to extend the function in our project but got errors because
snapshotView
is private!Use case:
Noticed other methods similar to this one had the
drawHierarchyInKeyWindow
parameter. For our use case we are using UIViewControllers as containers to SwiftUI views that contain UIVisualEffects. Without this parameter the UIVisualEffect would appear transparent in the snapshots.Is this something we can add? Thanks!