我正在编写一个应用程序,遇到了两个问题。我整晚都在网上搜索,但没有成功,我想知道这里是否有人能帮上忙。
提前谢谢。
乔
发布于 2012-01-04 09:06:24
applicationDidFinishLaunching或视图控制器的viewDidLoad中这样做,那么接口方向可能还没有正确设置。等待viewWillAppear或viewDidAppear检查。shouldAutorotateToInterfaceOrientation。您需要将YES返回到受支持的方向,所以在您的示例中,如果interfaceOrientation是景观(顺便说一下,有一个检查景观与纵向的辅助函数),您希望返回interfaceOrientation。还请看didRotateFromInterfaceOrientation,它告诉您用户什么时候旋转了.- [http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController\_Class/Reference/Reference.html](http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html)
https://stackoverflow.com/questions/8724233
复制相似问题