WEPopover exception when calling PresentFromBarButtonItem
Opened this issue · 0 comments
andreinitescu commented
I am using the WEPopover binding from the MonoTouch sample and it throws the following exception when calling PresentFromBarButtonItem
:
Objective-C exception thrown. Name: NSInvalidArgumentException Reason:
-[UIBarButtonItem frameInView:]: unrecognized selector sent to instance 0x7e4e1330
My code is:
Popover.Initialize ();
Popover.ShouldDismiss = true;
Popover.ContentViewController = new UIViewController() {
View = label,
PreferredContentSize = contentSize,
ContentSizeForViewInPopover = contentSize
};
var btnSlideMenu = this.NavigationItem.LeftBarButtonItems.First ();
Popover.PresentFromBarButtonItem (
btnSlideMenu,
UIPopoverArrowDirection.Down,
true);
It works fine when using PresentFromRect
How to make it work?