我的应用轮换在装有 iOS6 的 iPad 3 和 iPad 2 上正常工作,但在装有 iOS5 的 iPad1 上却没有。
我正在使用标签栏控制器和 5 视图控制器。在每个视图控制器上,我都有以下代码:
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration{
if(self.interfaceOrientation == UIDeviceOrientationPortrait||self.interfaceOrientation == UIDeviceOrientationPortraitUpsideDown){
self.view=self.VerticaleAppunti;
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"FONDO_VERT.jpg"]];
}
if(self.interfaceOrientation == UIDeviceOrientationLandscapeLeft||self.interfaceOrientation == UIDeviceOrientationLandscapeRight){
self.view=self.OrizzontaleAppunti;
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"FONDO.jpg"]];
}
}