我试图让我的应用程序更新以使用新的iPhone 5,并且我的某些视图将键盘从视图的顶部而不是底部放下。下面是一个图像更好地说明:键盘在UIViewController中颠倒
此的iOS 6.0之前的工作,所以我猜它一定有什么新的API中,是造成这个错误的光芒。我正在使用以下代码来支持UIVeiwController中的方向:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
- (BOOL)shouldAutorotate {
return YES;
}
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskLandscape;
}
是否有其他人看到类似的问题?谢谢!
它是在一个自定义的视图/窗口中,并且转换已经被应用? –