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

iOS Keyboard showing

$
0
0

Hi,

I have a custom renderer on my UI which inherits Entry. Once clicked, a Picker is fired (having to do it this way as there is no way to align the text in the picker centrally from what I can see).

When I click in the custom entry, the picker shows, but I'm also getting the keyboard. This only seems to be showing in iOS 9. Is there a way to dismiss the keyboard? I've tried the usual Control.ShouldBeginEditting = delegate {return false;}:, but that only results in the picker not showing.

I'm using this within the iOS custom renderer

protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
        {
            base.OnElementChanged(e);

            var baset = e.NewElement as CustomPicker;
            if (e.NewElement == null)
                return;

            if (Control != null)
            {
                Control.InputAccessoryView = CreateDropList(this, new UIPickerView(), Control, baset.PickerEntries);
                Control.EditingDidEnd += delegate
                {
                    App.Self.MessageEvents.BroadcastIt("pickerupdated", Control.Text);
                };
            }
        }

When I've used something similar in a native iOS app, I'm not getting the keyboard.

Is there something I need to be doing to remove the keyboard from the bottom of the picker?

PFJ


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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