[英]UIPopoverController
I would open a tableview pressing a button. 我将按下一个按钮打开一个tableview。 I made several attempts, according to this scheme:
根据此方案,我做了几次尝试:
- (IBAction)menuContext:(id)sender {
//ViewController2 *xx = [[ViewController2 alloc] init];
//ViewControllerXXX *xx = [[ViewControllerXXX alloc] init];
ViewController2 *xx = [[ApplicationModel sharedInstance] getView2];
UIPopoverController *over = [[UIPopoverController alloc] initWithContentViewController:xx];
[over setDelegate: (id) self];
[over presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated: YES];
}
but just clicks the button the program crashes ... 但是只要点击按钮,程序就会崩溃...
ViewController2 is a subclass of UITableViewController. ViewController2是UITableViewController的子类。 I can use it on the popover?
我可以在弹出窗口上使用它吗? thanks
谢谢
我想您没有设置按钮的选择器。请确保已完成选择(或者),您可能会将选择器设置为返回nil参数的方法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.