0

誰かがこれを理解したかどうか、私は興味があります。iOS 6 の時点で、デバイスの向きがどのように機能するかが変更されました。私の知る限り、新しいメソッドは次のようになります。

-(BOOL) shouldAutorotate {

UIInterfaceOrientation orientation = [[UIDevice currentDevice] orientation];
if (orientation == UIDeviceOrientationUnknown)
    orientation = UIInterfaceOrientationPortrait;

if (orientation==UIInterfaceOrientationPortrait) {
    // do some stuff
}
return NO;
}

私の質問は、Kobold2D で、このメソッドをどこに配置すれば、向きが変わらないように呼び出されるのでしょうか? 何をしても、デバイスの向きを変えるのをやめさせることができないようです。

4

0 に答える 0