在MyAppDelegate中,按下按钮时会显示模态视图:
- (void) showInfoPanel:(id)sender {
infoViewController = [[InfoViewController alloc] init]; UINavigationController * infoNavController = [[UINavigationController alloc] init]; infoNavController.navigationBarHidden = YES; [window addSubview:infoNavController.view]; [infoNavController presentModalViewController:infoViewController animated:YES];
}
在InfoViewController中我必须关闭模态视图:
- (void) exitInfoPanel:(id)sender {
[self.parentViewController dismissModalViewControllerAnimated:YES];
}
虽然它有效但MyAppDelegate窗口不再响应触摸。
代替在InfoViewController中:
[self.view removeFromSuperview];
它会对触摸作出反应,但我会丢失消除模态视图的动画。
我做错了什么,为什么当模态观点被驳回时它没有回复触摸? ?
谢谢