dismissing modalViewController moves main view but

2019-02-27 09:35发布

问题:

I'm using presentModalViewController and dismissModalViewController with animation set to YES in both cases. This works fine.

After the modal view is dismissed, all of the content on the main view has moved down what looks like 20px.

Would anyone have any idea why this happens?

回答1:

Is this app full screen?

I have seen some strange issues regarding apps that hide the status bar. You may try re-hiding the status bar in viewWillAppear or viewWillDisappear on the modal.

[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];