I am using presentModalViewController:
and dismissModalViewController:
with animation set to YES
in both cases, which works fine.
However, after the modal view is dismissed, all of the content on the main view has moved u开发者_JS百科p what looks like 20px. This affects all the view controllers.
Any idea why this happens, and how to overcome it?
Have you messed with your views' autoresize mask. Also, are you hiding the status bar? If both are true, then this is the problem.
Did you use any tabbar in your application? I have similar problem see this post,
iPad modalPresentationStyle UIModalPresentationFormSheet orientation problem
Is this app full screen?
if yes, You may try re-hiding the status bar in viewWillAppear or viewWillDisappear on the modal view controller.
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
This could have a few reasons, can you be more specific.
Possible Causes: Do you hide your status bar in one of the ViewController? Do you have a translucent NavigationBar in one of the views and a non translucent NavigationBar in the other?
精彩评论