アプリのローテーションは、iOS6 の iPad 3 および iPad 2 では正しく機能しますが、iOS5 の iPad1 では機能しません。
タブバーコントローラーと5つのビューコントローラーを使用しています。各View Controllerに次のコードがあります:
- (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"]];
}
}