xcode5 设置横屏 兼容ios5

重载shouldAutorotateToInterfaceOrientation:方法,这种方式是可行的。具体如下: 
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 

    // Return YES for supported orientations 
return ((interfaceOrientation ==UIDeviceOrientationLandscapeLeft)||(interfaceOrientation ==UIDeviceOrientationLandscapeRight)); 

如果有全局设置的方法,谢谢留言

你可能感兴趣的:(xcode5 设置横屏 兼容ios5)