From 40a4a5961ac5c2ee4f7a81f8e4b85675546ec135 Mon Sep 17 00:00:00 2001 From: Mike James Date: Wed, 15 Jun 2016 15:13:28 +0300 Subject: [PATCH] Check to see if camera is available. --- .../iOS/View Controllers/Discover/DiscoverViewController.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MobileApps/iOS/View Controllers/Discover/DiscoverViewController.cs b/MobileApps/iOS/View Controllers/Discover/DiscoverViewController.cs index a87715f..90e2a33 100644 --- a/MobileApps/iOS/View Controllers/Discover/DiscoverViewController.cs +++ b/MobileApps/iOS/View Controllers/Discover/DiscoverViewController.cs @@ -162,6 +162,9 @@ async void BeerSelected(Beer beer) void PictureImport() { + if (!UIImagePickerController.IsSourceTypeAvailable(UIImagePickerControllerSourceType.Camera)) + return; + var imagePicker = new UIImagePickerController(); imagePicker.SourceType = UIImagePickerControllerSourceType.Camera; PresentViewController(imagePicker, true, null);