Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

Commit 6d50564

Browse files
committed
2 parents adef222 + d571396 commit 6d50564

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

CustomRenderers/View/iOS/UICameraPreview.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ public UICameraPreview (CameraOptions options)
2525
Initialize ();
2626
}
2727

28-
public override void Draw (CGRect rect)
28+
public override void LayoutSubviews()
2929
{
30-
base.Draw (rect);
31-
previewLayer.Frame = rect;
30+
base.LayoutSubviews();
31+
32+
if (previewLayer != null)
33+
previewLayer.Frame = Bounds;
3234
}
3335

3436
public override void TouchesBegan (NSSet touches, UIEvent evt)

0 commit comments

Comments
 (0)