Kobold2D设备定位

时间:2013-02-03 15:32:57

标签: ios cocos2d-iphone screen-orientation kobold2d

我很好奇是否有人想出这个。从iOS 6开始,设备方向的工作方式发生了变化。据我所知,新方法如下所示:

-(BOOL) shouldAutorotate {

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

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

我的问题是,在Kobold2D中,我在哪里放置此方法以便调用它以防止方向改变?无论我做什么,我似乎无法让设备停止重新定位。

0 个答案:

没有答案
相关问题