私のオブジェクトのinitメソッド
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(didRotate:)
name:@"UIDeviceOrientationDidChangeNotification"
object:nil];
回転メソッドを実行しました
- (void) didRotate:(NSNotification *)notification {
NSLog(@"rotate notification");
//MA_MobileAppDelegate *appDelegate = (MA_MobileAppDelegate *)[[UIApplication sharedApplication] delegate];
//UIInterfaceOrientation orientation = appDelegate.tabBarController.interfaceOrientation;
UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
何らかの理由で、didRotateは実際のローテーションの前に呼び出されたようです。したがって、現在/最終ローテーションを取得しようとすると、最後のローテーションを取得します。これが当てはまらないように思われるViewControllerは1つだけです。私が間違っていることについて何か考えはありますか?