diff options
author | kadiryazgan <kadiryazgan@msn.com> | 2017-05-26 14:41:51 +0300 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2017-05-26 12:41:51 +0100 |
commit | 0834d2d13fa3f03d2396aa24a827c5c4727458d9 (patch) | |
tree | 90c51576b5216db64ba264e6f8131cf6e6df9bfd /Xamarin.Forms.Platform.iOS | |
parent | 609a12adef7df14eab972d91d4ed66c8a970d06c (diff) | |
download | xamarin-forms-0834d2d13fa3f03d2396aa24a827c5c4727458d9.tar.gz xamarin-forms-0834d2d13fa3f03d2396aa24a827c5c4727458d9.tar.bz2 xamarin-forms-0834d2d13fa3f03d2396aa24a827c5c4727458d9.zip |
make OnShouldReturn protected (#906)
* make OnShouldReturn protected
There are situations where we don't want to dismiss the keyboard when return key is pressed.
Making OnShouldReturn protected will let custom renderers to disable ResignFirstResponder behaviour.
* added virtual keyword to OnShouldReturn
Diffstat (limited to 'Xamarin.Forms.Platform.iOS')
-rw-r--r-- | Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs b/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs index dd8be853..83a7b5d0 100644 --- a/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs +++ b/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs @@ -127,7 +127,7 @@ namespace Xamarin.Forms.Platform.iOS ElementController.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, false); } - bool OnShouldReturn(UITextField view) + protected virtual bool OnShouldReturn(UITextField view) { Control.ResignFirstResponder(); ((IEntryController)Element).SendCompleted(); @@ -202,4 +202,4 @@ namespace Xamarin.Forms.Platform.iOS Control.Text = Element.Text; } } -}
\ No newline at end of file +} |