Skip to content

Commit

Permalink
[iOS] Adjust Started/Ended hooks in pickers for iOS 10 (xamarin#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldipietro authored and Jason Smith committed Sep 8, 2016
1 parent 36822e6 commit 420ceb3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Xamarin.Forms.Platform.iOS/Renderers/DatePickerRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ protected override void OnElementChanged(ElementChangedEventArgs<DatePicker> e)
{
var entry = new NoCaretField { BorderStyle = UITextBorderStyle.RoundedRect };

entry.Started += OnStarted;
entry.Ended += OnEnded;
entry.EditingDidBegin += OnStarted;
entry.EditingDidEnd += OnEnded;

_picker = new UIDatePicker { Mode = UIDatePickerMode.Date, TimeZone = new NSTimeZone("UTC") };

Expand Down
4 changes: 2 additions & 2 deletions Xamarin.Forms.Platform.iOS/Renderers/PickerRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ protected override void OnElementChanged(ElementChangedEventArgs<Picker> e)
{
var entry = new NoCaretField { BorderStyle = UITextBorderStyle.RoundedRect };

entry.Started += OnStarted;
entry.Ended += OnEnded;
entry.EditingDidBegin += OnStarted;
entry.EditingDidEnd += OnEnded;

_picker = new UIPickerView();

Expand Down
8 changes: 4 additions & 4 deletions Xamarin.Forms.Platform.iOS/Renderers/TimePickerRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ protected override void Dispose(bool disposing)
{
if (disposing)
{
Control.Started -= OnStarted;
Control.Ended -= OnEnded;
Control.EditingDidBegin -= OnStarted;
Control.EditingDidEnd -= OnEnded;

_picker.ValueChanged -= OnValueChanged;
}
Expand All @@ -49,8 +49,8 @@ protected override void OnElementChanged(ElementChangedEventArgs<TimePicker> e)
{
var entry = new NoCaretField { BorderStyle = UITextBorderStyle.RoundedRect };

entry.Started += OnStarted;
entry.Ended += OnEnded;
entry.EditingDidBegin += OnStarted;
entry.EditingDidEnd += OnEnded;

_picker = new UIDatePicker { Mode = UIDatePickerMode.Time, TimeZone = new NSTimeZone("UTC") };

Expand Down

0 comments on commit 420ceb3

Please sign in to comment.