Skip to content

Commit

Permalink
Apply layer affine transform when drawing for visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoNatan committed Oct 13, 2020
1 parent 56c609b commit 2f696a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion detox/ios/Detox/Utilities/UIView+Drawing.m
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ - (void)_dtx_drawViewHierarchyUpToSubview:(UIView*)subview rootView:(UIView*)roo
CGRect bounds = obj.bounds;
CGRect boundsInRootViewCoords = [rootView convertRect:bounds fromView:obj];
CGContextTranslateCTM(ctx, boundsInRootViewCoords.origin.x, boundsInRootViewCoords.origin.y);
[_DTXLayerForView(obj, afterUpdates) renderInContext:ctx];
CALayer* layer = _DTXLayerForView(obj, afterUpdates);
CGContextConcatCTM(ctx, [layer affineTransform]);
[layer renderInContext:ctx];
CGContextRestoreGState(ctx);
}
else
Expand Down

0 comments on commit 2f696a6

Please sign in to comment.