I'm having troubles with the Xamarin iOS implementation of the Popovers.
As far as I now, they are available via the new UIPopoverPresentationController class, described in the Apple docs (https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIPopoverPresentationController_class/ )
My code is something like this:
public partial class PopoverSettings : UIViewController
{
public PopoverSettings () //: base ("PopoverSettings", null)
{
}
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
View.Frame = new CoreGraphics.CGRect(0,0,100,100);
this.PreferredContentSize = new CoreGraphics.CGSize (10, 10);
View.BackgroundColor = UIColor.Red;
}
}
And I try to create it from
var myPop = new PopoverSettings();
myPop.ModalInPopover = true;
myPop.ModalPresentationStyle = UIModalPresentationStyle.Popover;
var pc = (UIPopoverPresentationController)myPop.PresentationController;
pc.SourceView = navigation;
pc.SourceRect = new CGRect(0,0,100,100);
this.PresentViewController(myPop, true, null);
The result is working, but I get a FULL SCREEN View Controller, not a "Popover" component!
Does anybody knows why it goes like this? Thanks!