我有使用横向右方向的应用程序。
在视图控制器中我使用:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
但是,如果用户locksiPhone 或 iPad 至portrait方向,屏幕显示
作为肖像,而不是风景。另外,在 info.plist 文件中我只定义了右风景方向为
支持了一位。
尝试设置UIInterfaceOrientation
输入您的 Info.plist 到UIInterfaceOrientationLandscapeRight
。这应该会在启动时强制横向方向正确。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)