willRotateToInterfaceOrientation:duration:在风景中调用,而不是在iPad 4.3模拟器中以纵向方式调用

时间:2011-07-17 20:08:30

标签: objective-c ipad uikit

我已经实施了MGSplitViewController,并注意到当iPad模拟器和设备处于横向模式时调用willRotateToInterfaceOrientation:duration:didRotateFromInterfaceOrientation:,而不是纵向模式时调用- (void) viewDidAppear:(BOOL)animated { NSLog(@"%@", NSStringFromSelector(_cmd)); NSLog(@"%@", [NSString stringWithFormat:@"self.interfaceOrientation: %@", (self.interfaceOrientation == UIInterfaceOrientationPortrait) ? @"Portrait" : @"Landscape"]); if (UIInterfaceOrientationIsPortrait(self.interfaceOrientation)) { splitViewController.vertical = YES; [splitViewController toggleMasterView:self]; [splitViewController toggleSplitOrientation:self]; } } willRotateToInterfaceOrientation:duration:。当我在以下时间执行以下操作时:

didRotateFromInterfaceOrientation:

当我以纵向或横向显示设备时,日志始终打印纵向。

  1. 为什么self.interfaceOrientationviewDidAppear:仅在风景中被调用?
  2. {{1}}执行{{1}}时{{1}}不正确吗?
  3. 谢谢,

0 个答案:

没有答案