mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-14 18:12:09 +08:00
fix(shared-transitions): layer opacity set back to original on next tick (#10310)
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user