好吧,我想我找到了答案。
如果有人看到任何問題,我會很感激,如果你讓我知道,但是這是爲我工作至今:
在我的主視圖控制器(在打開的酥料餅的一個):
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
UIStoryboardPopoverSegue *popoverSegue = (UIStoryboardPopoverSegue*) segue;
currentPopover = [popoverSegue popoverController];
currentPopover.delegate = self;
UINavigationController *destinationNavController = (UINavigationController*)segue.destinationViewController;
SelectServerToConnectViewController *destinationView = [destinationNavController.childViewControllers objectAtIndex:0];
destinationView.parentPopover = currentPopover;
}
在我SelectServerToConnectViewController:
-(void)tableView:(UITableView *)tableView didHighlightRowAtIndexPath:(NSIndexPath *)indexPath {
ServerItem *selectedServer = [CoreDataController getServerForIndex:indexPath.row];
[parentPopover dismissPopoverAnimated:true];
}
你需要一個指針酥料餅。 –