Not sure if it is a Xamarin IOS bug but on the same panel we have a custom control that pops a modal view of choices(like a picker) and a standard Xamarin Forms Picker. If the standard picker is displaying the scroller at the bottom and then then custom modal control is tapped and receives focus the modal view pops up but the standard picker never disappears creating a hung panel.
The standard IOS picker does lose focus but never disappears. I have a renderer created but can't figure how to close the IOS picker.
namespace HCMobile.iOS.CustomRenderers
{
public class CustomPickerRenderer : PickerRenderer
{
public CustomPickerRenderer() { }
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
base.OnElementPropertyChanged(sender, e);
var isFocused = ((Picker)sender).IsFocused;
// This fires when the IOS picker looses focus but never closes the picker at the bottom of the panel. Scroller disappears if ANY other control receives focus.
if (Control != null && !isFocused)
{
UIPickerView pickerView = (UIPickerView)Control.InputView;
}
else
{
UIPickerView pickerView = (UIPickerView)Control.InputView;
}
}
}
}
Has anyone else ran into this problem?