[英]Kobold2D Device Orientation
我很好奇是否有人知道了这一点。 自iOS 6起,设备方向的工作方式已发生变化。 据我所知,新方法如下所示:
-(BOOL) shouldAutorotate {
UIInterfaceOrientation orientation = [[UIDevice currentDevice] orientation];
if (orientation == UIDeviceOrientationUnknown)
orientation = UIInterfaceOrientationPortrait;
if (orientation==UIInterfaceOrientationPortrait) {
// do some stuff
}
return NO;
}
我的问题是,在Kobold2D中,应在哪里放置此方法,以便调用该方法以防止方向发生变化? 无论我做什么,我似乎都无法使设备停止重新定向。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.