[英]UIPopoverController
我將按下一個按鈕打開一個tableview。 根據此方案,我做了幾次嘗試:
- (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的子類。 我可以在彈出窗口上使用它嗎? 謝謝
我想您沒有設置按鈕的選擇器。請確保已完成選擇(或者),您可能會將選擇器設置為返回nil參數的方法
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.