为什么SCNView无法在iPhone XS Max上运行?

问题描述

我有一个以编程方式创建的场景。它可以正常工作,然后有一天,一个QATester报告称她的手机的SceneView无法正常工作(显然,她的手机的代码存在很多问题,疯狂的随机错误不确定iPhone XS Max上正在发生什么。)

现在我已经创建了这样的场景:

        let scene = SCNView()
        scene.frame = scvContainer.frame
        scene.autoresizingMask = [.flexibleWidth,.flexibleHeight]
        scene.backgroundColor = .clear
        vLayout = scene

        // Added to a scrollView's container 
        scvContainer.superview?.addSubview(scene)
    
    // After sometime (added the view first,then request API then wait a bit)
        scene.scene = SCNScene()
        scene.allowsCameraControl = true
        scene.antialiasingMode = .multisampling4X
        scene.preferredFramesPerSecond = 60

        // This is just for the sake of demonstrating the problem
        scene.scene?.rootNode.addChildNode(SCNNode(geometry: SCNSphere(radius: 50)))

然后显示图像:

SceneView

由于我还是SceneKit的新手,所以我不知道发生了什么。 紫色视图是我希望ScnView显示球体的位置。这是在iPhone XS Max,Real Device iOS13,iPhone xs max模拟器12.4上发生的。

我认为可能是因为渲染,但是我不知道如何选择渲染器。如果不使用sceneKit和SCNView,还有哪些其他选项可用于渲染3d?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)