2021年1月7日星期四

Xcode SceneKit Unable to Change SCNView Frame

I want to change the frame of a SCNView at some point during the runtime. I have the SCNView initialized as below:

var sceneView: SCNView!    sceneView = SCNView(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: view.frame.height))  view.addSubview(sceneView)  

However, I'm unable to change its frame with the following:

sceneView = SCNView(frame: CGRect(x: 0, y: 0, width: 200, height: 200))  

The sceneView simply remains the same size and position.

https://stackoverflow.com/questions/65622924/xcode-scenekit-unable-to-change-scnview-frame January 08, 2021 at 11:09AM

没有评论:

发表评论