0
我有一个只能在横向模式下工作的游戏。当我演示相机时,由于定位问题导致应用程序崩溃。我通过在AppDelegate中添加以下方法解决了这个问题。当呈现相机时只出现应用程序崩溃 - Cocoa2d
-(NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskAllButUpsideDown;
}
-(BOOL)shouldAutorotate {
return [[UIDevice currentDevice] orientation] != UIInterfaceOrientationPortrait;
}
然而,它的作品,但它改变了应用程序,以支持所有的方向。我需要的是应用程序仅支持相机的肖像模式。展示相机后,该应用仅支持横向模式。
任何帮助将不胜感激。
是否有可能在cocoa2d应用程序中创建临时视图控制器 –