Using Xamarin Forms, how can the default picker view be changed to show in a PopoverController? The code below throws "Popovers cannot be presented from a view which does not have a window." on iOS.
public class BindablePickerRenderer : PickerRenderer {
private UIPickerView picker;
protected override void OnElementChanged(ElementChangedEventArgs<Picker> e) {
base.OnElementChanged(e);
this.picker = new UIPickerView() {
Source = (UIPickerViewModel) new PickerSource(e.NewElement)
};
var popoverContent = new UIViewController();
popoverContent.View = picker;
var popoverController = new UIPopoverController(popoverContent);
popoverController.PopoverContentSize = new SizeF(320, 180);
popoverController.PresentFromRect(picker.Frame, this.Control.InputView, UIPopoverArrowDirection.Up, true);
}
}