我会按一个按钮打开一个表格视图。根据这个方案,我做了几次尝试:
- (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];
}
但只需单击按钮程序崩溃...
ViewController2 是 UITableViewController 的子类。我可以在弹出窗口上使用它吗?谢谢