[英]SceneKit – Application is getting crash
I am creating a 3d app using SceneKit and DAE files. 我正在使用SceneKit和DAE文件创建3d应用程序。 My app is getting crash on: 我的应用崩溃了:
SCNView *myView = (SCNView *)self.view;
myView.scene = [SCNScene sceneNamed:@"p1.dae"];
myView.allowsCameraControl = YES;
myView.autoenablesDefaultLighting = YES;
myView.backgroundColor = [UIColor lightGrayColor];
reason behind crash is reason: 崩溃的原因是:
-[UIView setScene:]: unrecognized selector sent to instance 0x7f9338f2ca20 -[UIView setScene:]:无法识别的选择器已发送到实例0x7f9338f2ca20
Can you please tell me what is the problem with code? 您能告诉我代码有什么问题吗?
looks like you instantiated a UIView in your xib file instead of an SCNView. 看起来您在xib文件而不是SCNView中实例化了一个UIView。 You can drag and drop an SCNView from the Objects library in the lower-right corner of Xcode. 您可以从Xcode右下角的Objects库中拖放SCNView。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.