-1

我有一个标签栏应用程序,带有一些 uinavigationcontrollers。

在我拥有的每个 VC 中:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
  return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

但是由于某种原因,当旋转屏幕时,状态栏会旋转,但我的其余部分保持不变。我怎样才能解决这个问题?

4

2 回答 2

-1

尝试将此添加到您的 info.plist在此处输入图像描述

于 2011-05-12T03:50:02.957 回答
-1

shouldAutorotateToInterfaceOrientation:通常会这样实现(对于支持旋转的 iPhone 应用程序):

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
  return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

从您的问题中不清楚您是否希望子视图旋转或状态栏不旋转。

于 2011-05-12T04:34:16.677 回答