开发者

Dismissing a modal view in horizontal orientation?

I have a modal view that is presented and dismissed fine when my device is in vertical orientation. I have problems when my modal view is presented in the vertical orientation, but dismissed 开发者_运维知识库in horizontal orientation. The entire app switches back to vertical orientation automatically. How can I ensure that if I am in horizontal orientation, the view should dismiss properly?


I assume that what you mean by "presented in the vertical orientation, but dismissed in horizontal orientation" is you rotate the device when the modal view controller is shown.

In this case, you need to also rotate the "parentViewController", while the modal view controller is shown. You have to implement the view controller rotation methods, and inside the implementation, you have to make sure that the parent view controller is sent this messages / methods too.

You need to maintain orientation consistency in the view hierarchy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜