我正在开发 iPad 应用程序,在 modalView Controller 中显示一些 View 。
在景观中,当我单击 UITextField
进行一些输入时,模态视图 Controller 会上升并出现键盘。
但我改变了 modalViewController 的高度,我不希望 modalView 上升到键盘。我怎样才能做到这一点?有什么帮助吗?
最佳答案
在 UIViewController 的代码中,您移动其 modalViewController 的位置,检查界面方向是否不是横向
if(([self.interfaceOrientation!=UIInterfaceOrientationLandscapeLeft])
&&([self.interfaceOrientation!=UIInterfaceOrientationLandscapeRight]))
//your code to repostion the view controlled by the modalViewController
关于iphone - 如何限制 Landscape 中的 modalViewController?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8381650/