Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

UIImagePickerController

$
0
0

Is it possible to use a UIImagePickerController from a Xamarin Forms app? I tried hooking up the call through the DependencyService but I get a warning saying that the view for UIImagePickerController is not in the window hierarchy.

        UIImagePickerController imagePicker = new UIImagePickerController ();
        imagePicker.SourceType = UIImagePickerControllerSourceType.PhotoLibrary;
        imagePicker.MediaTypes = UIImagePickerController.AvailableMediaTypes (UIImagePickerControllerSourceType.PhotoLibrary);
        imagePicker.FinishedPickingMedia += Handle_FinishedPickingMedia;
        imagePicker.Canceled += Handle_Canceled;

        AppDelegate.window.RootViewController.PresentViewController(imagePicker, true, null);

Appreciate any suggestions!


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>