[MonoTouch] Camera Preview

Pavel Sich pavel.sich at me.com
Tue Dec 20 16:25:01 EST 2011


You need to present the view controller. So you do not do it in view load but as a result to some action, typically button touch. Use it as present modal view controller. 

public override void ViewDidLoad ()
{
base.ViewDidLoad ();
UIImagePickerController Picker = new UIImagePickerController();
Picker.SourceType = UIImagePickerControllerSourceType.Camera;
Picker.Delegate = uiPicPreview;

}

private void myCameraButtonTouched(object sender, EventArgs e)
{
   this.PresentModalViewController (Picker, true); // thats it your view controller will be shown
}


Hope this helps.
-Pavel

--
Pavel Sich
@sichy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20111220/50434789/attachment.html 


More information about the MonoTouch mailing list