AVCamBarcode.PreviewView.LayoutSubviews C# (CSharp) Метод

LayoutSubviews() публичный Метод

public LayoutSubviews ( ) : void
Результат void
		public override void LayoutSubviews ()
		{
			base.LayoutSubviews ();

			// Disable CoreAnimation actions so that the positions of the sublayers immediately move to their new position.
			CATransaction.Begin ();
			CATransaction.DisableActions = true;

			// Create the path for the mask layer. We use the even odd fill rule so that the region of interest does not have a fill color.
			var path = UIBezierPath.FromRect (new CGRect (0, 0, Frame.Width, Frame.Height));
			path.AppendPath (UIBezierPath.FromRect (RegionOfInterest));
			path.UsesEvenOddFillRule = true;
			maskLayer.Path = path.CGPath;

			regionOfInterestOutline.Path = CGPath.FromRect (RegionOfInterest);

			var r = RegionOfInterestControlRadius;
			topLeftControl.Position = RegionOfInterest.CornerTopLeft ().WithOffsetX (-r).WithOffsetY (-r);
			topRightControl.Position = RegionOfInterest.CornerTopRight ().WithOffsetX (-r).WithOffsetY (-r);
			bottomLeftControl.Position = RegionOfInterest.CornerBottomLeft ().WithOffsetX (-r).WithOffsetY (-r);
			bottomRightControl.Position = RegionOfInterest.CornerBottomRight ().WithOffsetX (-r).WithOffsetY (-r);

			CATransaction.Commit ();
		}