我可以永久固定我的应用程序到景观吗?
发布于 2011-03-24 18:30:09
在应用程序的Info.plist文件中,添加UIInterfaceOrientation密钥并将其值设置为横向模式。对于横向,可以将该关键点的值设置为UIInterfaceOrientationLandscapeLeft或UIInterfaceOrientationLandscapeRight。
覆盖视图控制器的shouldAutorotateToInterfaceOrientation:方法,并仅为所需的横向方向返回YES,为纵向方向返回NO。
有关详细信息,请参阅Landscape Mode ONLY for iPhone or iPad
https://stackoverflow.com/questions/5417721
复制相似问题