I am looking to implement a CameraView/CameraPreview in my forms app and I am currently looking to get it to work on iOS first. I have found the following sample: https://github.com/xamarin/ios-samples/blob/master/ios11/AVCam/src/AVCamPreviewView.cs
Note it is extending UIView
. So I have made AVCamPreviewView
a renderer by extending ViewRender
- assuming i'ts valid to change out the UIView
to ViewRenderer`. Additionally I wish to add properties, used and accessible inside forms - but having changing effects in native.
public interface ICameraView
{
string TakeImage();
void Start();
void Stop();
}
However having an interface I am forced to also make an implementation on my CameraView
inside the my forms project. So I have considered making the CameraView
class abstract. But then I can't implement anything in my renderer?
I am not particularly interested in having CameraView
extending anything
How can I build a xamarin forms control from a native control?