Keyboard 键盘方向在ios6中无法正常工作

Keyboard 键盘方向在ios6中无法正常工作,keyboard,ios6,Keyboard,Ios6,我在iOS6中遇到了自动旋转和定向问题。它们在iOS5中不再像以前那样工作。下面是一个示例代码 implementation mainProgram // view controller is defined in landscape mode (.xib file) // The preferredInterfaceOrientationForPresentation and supportedInterfaceOrientations have not been defined becaus

我在iOS6中遇到了自动旋转和定向问题。它们在iOS5中不再像以前那样工作。下面是一个示例代码

implementation mainProgram
// view controller is defined in landscape mode (.xib file)
// The preferredInterfaceOrientationForPresentation and supportedInterfaceOrientations have not been defined because they give me problems with getting the orientation right of other calling classes

-(IBAction)somButtonPressed:(id)sender{
      [self presentViewController:inputText animated:NO completion:nil];
 }
 @end

/////////////////////////////////////////////////////////
// This has has several  UITextField 
// The view of this controller is defined as landscape in .xib
implementation inputText

- (void)viewDidLoad
{
    [super viewDidLoad];

}

- (BOOL)shouldAutorotate {
    return YES;
}

#if 0  // Disabled
- (NSUInteger)supportedInterfaceOrientations {
    return UIInterfaceOrientationLandscapeRight;
}
#endif

#if 1  // Enabled
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    return UIInterfaceOrientationLandscapeRight;
}
#endif
@end
问题/意见: 1.如果在inputText中启用了supportedInterfaceOrientations,返回值为UIInterfaceOrientationAndscapeRight,则程序将无法说明preferredInterfaceOrientationForPresentation试图设置为无效的方向,即使该方向与supportedInterfaceOrientations中的方向完全相同

  • 当我尝试在inputText的其中一个UITextField上输入文本时,键盘以纵向模式显示,而不是以LandscapeRight显示。inputText控制器的视图在景观正确方向上显示良好 在我看来,它们都是ios6中的bug。还有其他人遇到过这些问题吗