0
我的應用程序旋轉在iOS 3上的iPad 3和iPad 2上正常工作,但在iOS1上未在iPad1上正常工作。iOS 6上的界面旋轉工作,但iOS 5上的界面旋轉工作
我正在使用標籤欄控制器和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"]];
}
}
下一次,請使用搜索。並看看iOS6的變化:https://developer.apple.com/library/ios/#releasenotes/General/WhatsNewIniPhoneOS/Articles/iOS6.html#//apple_ref/doc/uid/TP40011812-SW1 – jimpic