的iOS UIInterfaceOrientation不与iOS 5

问题描述:

工作时,我使用UIInterfaceOrientation在iOS 4的的任何设备的工作完美 但当iOS 5中使用它不是像iOS 4的的iOS UIInterfaceOrientation不与iOS 5

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

任何想法

+2

它适用于我。你能详细说明它是如何“不起作用”的吗? – Chris 2012-07-16 11:03:56

+1

在iPhone iOS 5只是状态栏旋转,但应用程序的屏幕没有 – Mutawe 2012-07-16 12:24:40

+0

你在视图控制器中有什么样的子视图?你是否以编程方式或从IB更改了任何调整大小的蒙版? – ahmad 2012-07-16 12:57:49

您发送了:

[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications] 

在您的应用程序委托中?如果不匹配它和“end ...”消息 - 谷歌这些方法的更多信息