您可以改为以编程方式管理方向并覆盖 willRotateToInterfaceOrientation 方法。看路:
#define IPAD_SIZE_PORTRAIT CGSizeMake(768, 960)
#define IPAD_SIZE_LANDSCAPE CGSizeMake(1024, 704)
-(void)relayoutSubviews:(UIInterfaceOrientation)orientation
{
CGSize scrSize;
if ((orientation == UIInterfaceOrientationLandscapeLeft) || (orientation == UIInterfaceOrientationLandscapeRight))
{
scrSize = IPAD_SIZE_LANDSCAPE;
}
else
{
scrSize = IPAD_SIZE_PORTRAIT;
}
self.view.bounds = CGRectMake(0, 0, scrSize.width, scrSize.height);
self.view.frame = CGRectMake(0, 0, scrSize.width, scrSize.height);
}
-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
[self relayoutSubviews:toInterfaceOrientation];
}