在UISplitView中调用dismissModalViewController会导致旋转到纵向模式
我在 UISplitViewApplication
中呈现一个 UIModalView
。我已经连接了一个“完成”操作,即:
- (IBAction) donePressed:(id) sender
{
[self dismissModalViewControllerAnimated:YES];
}
当我按下按钮时,设备的方向更改为肖像模式。这是为什么呢?
I am presenting a UIModalView
in a UISplitViewApplication
. I have wired up a "done" action, which is:
- (IBAction) donePressed:(id) sender
{
[self dismissModalViewControllerAnimated:YES];
}
When I press the button, the orientation of the device changes to potrait mode. Why is this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您没有提供足够的代码让任何人都能够给您准确的答案,但一种可能性是您没有在所有控制器中实现以下方法:
I don't think you've provided enough code for anyone to be able to give you an accurate answer, but one possibility is that you haven't implemented the following method in all of your controllers:
我遇到了这个问题,接受的解决方案并没有为我解决它。
我试图从 UIPopoverController 加载模态视图控制器,每次它被关闭时,它都会旋转到纵向。
当我移动模态视图以从 UISplitView 的详细视图控制器加载时,它工作得很好。
I had this problem and the accepted solution didn't solve it for me.
I was trying to load a modal view controller from a UIPopoverController, and every time it was dismissed it would rotate to portrait.
When I moved the modal view to load from the Detail View Controller of the UISplitView it worked fine.