在6之前初始方向都是UIDeviceOrientationLandscapeLeft,用新的sdkios7编译后发现,初始方向是UIDeviceOrientationLandscapeRight,尼玛,真痛苦,网上各种找,试了- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
这个方法,发现没用,最后无奈发现Info.plist中的Supported interface orientations数组中第一个竟然是Landscape (left home button),于是,调换了这2个的顺序,第一个为Landscape (right home button)。重新编译,竟然成了,好吧!

本文描述了一个iOS7应用的方向显示问题,在iOS7中应用启动时的默认方向变为UIDeviceOrientationLandscapeRight,通过调整Info.plist文件中Supportedinterfaceorientations数组内元素的顺序解决了此问题。
1296

被折叠的 条评论
为什么被折叠?



