I would open a tableview pressing a button. 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. I can use it on the popover? thanks
我想您没有设置按钮的选择器。请确保已完成选择(或者),您可能会将选择器设置为返回nil参数的方法
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.