【发布时间】:2013-09-14 23:52:59
【问题描述】:
我正在使用iOS 5 和XCode 4.2。编码后,我支持横向和纵向。它工作正常。但是当我使用XCode 4.5iOS 6中的代码时,不支持方向。
有人知道原因吗?
【问题讨论】:
-
你有没有使用任何设置方向的方法?你能放一些示例代码吗?
-
yes.- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return yes; }
-
尝试使用 - (BOOL)shouldAutorotate{ return yes;}。它将调用 ios6 而不是 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 方法。
-
yes.. 在 ios6 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 不会被调用。
-
在 iOS6 中,我接到电话 - (BOOL)shouldAutorotate{ return yes;}。对不起我的错误。
标签: objective-c ios5 ios6 xcode4.2 xcode4.5