O'Reilly logo

Xamarin Blueprints by Michael Williams

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a control for the iOS camera

Now that we have built the CameraView object in the Xamarin.Forms PCL, we are going to build the CustomRenderer for iOS. Jump into the Camera.iOS project and add a new folder called Renderers, and then add a new file called CameraiOS.cs and implement the following private properties:

public sealed class CameraIOS : UIView { #region Private Properties private readonly string _tag; private readonly ILogger _log; private readonly AVCaptureVideoPreviewLayer _previewLayer; private readonly AVCaptureSession _captureSession; private UIView _mainView; private AVCaptureDeviceInput _input; private AVCaptureStillImageOutput _output; private AVCaptureConnection _captureConnection; private AVCaptureDevice _device; private ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required