开发者

dismissModalView doesn't respond to touches

开发者 https://www.devze.com 2023-01-17 05:09 出处:网络
in MyAppDelegate, when a button is pressed it presents a modal view: - (void) showInfoPanel:(id)sender {

in MyAppDelegate, when a button is pressed it presents a modal view:

- (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];

}

in InfoViewController i have to dismiss the modal view:

- (void) exitInfoPanel:(id)sender {

 [self.parentViewController dismissModalViewControllerAnimated:YES];

}

although it works, the MyAppDelegate window doesn't respond to touches anymore.

instead in the InfoViewController if:

[self.view removeFromSuperview];

It respond to touches but I lose the animation of dismissing the modal view.

What I am doing wrong, why i开发者_开发技巧t doesn't respond to touches when the modalview is dismissed? ?

thanks

0

精彩评论

暂无评论...
验证码 换一张
取 消