at_yasu's blog

ロード的なことを

起動時に横倒し

横倒しのまま起動した時、それを検知する方法。

起動時に、UIDeviceが回転状態を「UIDeviceOrientationDidChangeNotification」で飛ばすみたいだから、それを取得して現在情報を見たらいいみたい。


- (void) orientationChanged:(NSNotification *)notification
{
	UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
	...
}

...

    [[NSNotificationCenter defaultCenter] addObserver:self
                selector:@selector(orientationChanged:)
                    name:UIDeviceOrientationDidChangeNotification
                  object:nil];


参考:http://www.cocos2d-iphone.org/forum/topic/6413