是什么原因导致状态栏与视图重叠?

时间:2011-11-21 08:32:52

标签: ios5

知道状态栏在presentModalViewController->dismissModalViewControllerAnimated

之后与视图重叠的原因

enter image description here

Xcode:4.2 SDK:iOS 5 部署目标:3.2 ARC:ON

1 个答案:

答案 0 :(得分:0)

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    UIViewController* currentViewController = [self getCurrentViewController];
    return [currentViewController shouldAutorotateToInterfaceOrientation:interfaceOrientation];
}

更改为:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    UIViewController* currentViewController = [self getCurrentViewController];
    return [currentViewController canRotate]; // the implement is exactly as same as shouldAutorotateToInterfaceOrientation:
}

解决了这个问题,但我不明白为什么。

相关问题