summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Platform.iOS
diff options
context:
space:
mode:
authoradrianknight89 <adrianknight89@outlook.com>2017-01-04 07:11:09 -0600
committerRui Marinho <me@ruimarinho.net>2017-01-04 13:11:09 +0000
commit24d8dab89772eb5c8d5fa504d47870d8769dc365 (patch)
tree621cbd9ae3e67f41211679e7cd38b91de4b16e9e /Xamarin.Forms.Platform.iOS
parent58909e205a6b10fd1ed834c0ea5a37950504d035 (diff)
downloadxamarin-forms-24d8dab89772eb5c8d5fa504d47870d8769dc365.tar.gz
xamarin-forms-24d8dab89772eb5c8d5fa504d47870d8769dc365.tar.bz2
xamarin-forms-24d8dab89772eb5c8d5fa504d47870d8769dc365.zip
[iOS] Platform specifics for controlling Picker SelectedIndex change behavior (#540)
* picker selected index could change when picker view is dismissed * use enum
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r--Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs
index 169ac3ed..c0f10d10 100644
--- a/Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs
+++ b/Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs
@@ -2,6 +2,7 @@ using System;
using System.Collections.Specialized;
using System.ComponentModel;
using UIKit;
+using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
using RectangleF = CoreGraphics.CGRect;
namespace Xamarin.Forms.Platform.iOS
@@ -178,7 +179,9 @@ namespace Xamarin.Forms.Platform.iOS
SelectedItem = _renderer.Element.Items[(int)row];
SelectedIndex = (int)row;
}
- _renderer.UpdatePickerFromModel(this);
+
+ if(_renderer.Element.On<PlatformConfiguration.iOS>().UpdateMode() == UpdateMode.Immediately)
+ _renderer.UpdatePickerFromModel(this);
}
}
}