【发布时间】:2012-06-18 09:01:45
【问题描述】:
当我的应用程序启动时,它最初是纵向的。它可以在 ipad 设备物理旋转时旋转。
我希望添加一个功能,允许用户单击按钮打开帮助教程。我希望教程只是横向的。
所以我重写了shouldAutorotateToInterfaceOrientation 方法来检查应用程序是否处于帮助教程模式;如果是,则返回“是”:
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
interfaceOrientation ==UIInterfaceOrientationLandscapeRight)`
当屏幕是纵向的,并且用户点击按钮打开帮助教程时,如何在按钮响应代码的开头将屏幕旋转为横向?
【问题讨论】: