fix(ios): opacity handling on snapshot

This commit is contained in:
Nathan Walker
2023-06-07 12:18:34 -07:00
parent f64355ba7a
commit 807228b90c

View File

@@ -286,7 +286,10 @@ export function snapshotView(view: UIView, scale: number): UIImage {
view.layer.renderInContext(UIGraphicsGetCurrentContext());
const image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
view.layer.opacity = originalOpacity;
setTimeout(() => {
// ensure set back properly on next tick
view.layer.opacity = originalOpacity;
});
return image;
}