0

When autorotating, I set

GAME_AUTOROTATION = kGameAutorotationUIViewController

and

#elif GAME_AUTOROTATION == kGameAutorotationUIViewController    
    return ( UIInterfaceOrientationIsLandscape( interfaceOrientation ) );

This means that if I hold the device in either landscape orientation it will autorotate. The thing is, the rotation is always shifted by 90 degrees (ie when I rotate to landscape right I get portrait).

How do I go along in fixing this?

4

1 回答 1

1

正确的设置方法GAME_AUTOROTATION是这样的:

#define GAME_AUTOROTATION kGameAutorotationUIViewController

(我在 GameConfig.h 中有我的。)

我无法理解GAME_AUTOROTATION = kGameAutorotationUIViewController,所以只是认为这可能是问题的原因(如果你这样使用它)。

无论如何,如果您仍然遇到自动旋转问题,请在其中设置一个断点willRotateToInterfaceOrientation并检查从那里发生的情况;与 相同willAnimateRotationToInterfaceOrientation

于 2012-04-21T09:30:00.113 回答