所以我正在展示一个 UIPopoverView 像这样:
if (self.BStatePopoverViewController == nil) {
RedStatePopoverViewController *settings =
[[RedStatePopoverViewController alloc]
initWithNibName:@"RedState"
bundle:[NSBundle mainBundle]];
UIPopoverController *popover =
[[UIPopoverController alloc] initWithContentViewController:settings];
popover.delegate = self;
self.BStatePopoverViewController = popover;
}
[BStatePopoverViewController setPopoverContentSize:CGSizeMake(320, 445)];
[self.BStatePopoverViewController presentPopoverFromRect:[sender bounds] inView:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
一旦视图被加载到弹出窗口中,我就有了一个按钮,我想用它来在弹出窗口中显示一个新的 UIViewController。我尝试将其呈现为模态视图,但这会更改父视图,而不是弹出窗口中的视图:
PopupDischargeViewController * dischargeview = [[PopupDischargeViewController alloc] initWithNibName:@"PopupDischargeViewController" bundle:nil];
[self presentModalViewController:dischargeview animated:NO];
任何关于我如何做到这一点的帮助将不胜感激。
谢谢!