---
title: "cocos2d在IOS6上的初始屏幕方向"
author: "wjjxf"
date: "2013-10-07T00:31:52Z"
tags: []
categories: ["移动开发"]
slug: "cocos2d-ios6"
draft: false
lastmod: "2013-10-07T00:31:52Z"
id: 1952503
url: "https://hfutfei.iteye.com/blog/1952503"
---

在6之前初始方向都是UIDeviceOrientationLandscapeLeft，用新的sdkios7编译后发现，初始方向是UIDeviceOrientationLandscapeRight，尼玛，真痛苦，网上各种找，试了- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation 

这个方法，发现没用，最后无奈发现Info.plist中的Supported interface orientations数组中第一个竟然是Landscape (left home button)，于是，调换了这2个的顺序，第一个为Landscape (right home button)。重新编译，竟然成了，好吧！