我是Monotouch的新手,但我在遥远的过去做了一些Objective C。我试图弄清楚我将如何执行以下操作:Monotouch,UIPopover并获得事件
- 我有一个带有Naviagtion Bar和按钮的ViewController。
- 当我点击按钮,我想要一个UIPopOver出现,它可能有一个tableview或按钮。
我想解决的是我如何从UIPopOver中的视图中获取委托/事件以将其事件发送回调用视图。
在Objective C中设置的呼叫委托在这样的观点:
UIPopoverController *popover =
[[UIPopoverController alloc] initWithContentViewController:myPopOverViewcontrol];
popover.delegate = self;
所以在MonoTouch的你怎么做?如果像这样设置UIPopOver:
UIPopoverController myPopOver = new UIPopoverController(new myPopOverViewControl());
myPopOver.PopoverContentSize = new SizeF(200f, 300f);
myPopOver.PresentFromRect (btnButton.Frame, v, UIPopoverArrowDirection.Up, true);
如何附加代表?
感谢
迈克