Reputation: 303
I am creating a 3d app using SceneKit and DAE files. 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
Can you please tell me what is the problem with code?
Upvotes: 0
Views: 505
Reputation: 13462
looks like you instantiated a UIView in your xib file instead of an SCNView. You can drag and drop an SCNView from the Objects library in the lower-right corner of Xcode.
Upvotes: 1