在那裏你啓動settingsPopover功能你的「父」的對象,你應該有:
- (void) launchDismissSettingPopover {
if (settingPopover == nil) {
//Create an launch the popover
} else {
[self dismissPopoverAnimated:YES];
// settingPopover will be nil in navigationController didShowViewController
//self.settingsPopover = nil;
}
}
你應該有self.navigationController.delegate =自之前在父類
-(void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
if (viewController == self && self.settingPopover != nil) {
//need to show more Info based on settingPopover info here
self.settingPopover = nil ;
}
}
然後在你的popover類的方法
- (IBAction)showFullVersionInfo:(id)sender
{
[parent launchDismissSettingPopover];
}
看起來你沒有麻煩解僱popover,但你想知道如何顯示另一種觀點?您想在何處顯示此視圖與彈出窗口之外的任何用戶界面有關? – rickster 2012-03-16 22:52:24
@rickster上面的代碼不能刪除彈出窗口...仍然試圖讓它工作。 – milesmeow 2012-03-17 07:34:41