App crash
Hello.. Aditthya Bhat
The application crash when press Plus button. Please Fix or advice for me use.
Thank you
Hello.. Aditthya Bhat
The application crash when press Plus button. Please Fix or advice for me use.
Thank you
In LineNode.swfit, change let nodeLine = SCNNode(geometry: boxGeometry) to nodeLine = SCNNode(geometry: boxGeometry)
Fix for app crash on click Plus button You don't need to create instance on line number 33 ( let nodeLine = SCNNode(geometry: boxGeometry ) You already have initialise on top line number 17 ( private var nodeLine: SCNNode!)
File name LineCode.Swift Solution: - Replace Line number 17 into Optional ( private var nodeLine: SCNNode! ) Replace line number 33 into ( nodeLine = SCNNode(geometry: boxGeometry ) Replace line number 34 into ( nodeLine?.position.y = Float(-height/2) + 0.001 ) Replace line number 35 into ( nodeZAlign.addChildNode(nodeLine ?? SCNNode()) ) Replace line number 61 into ( nodeLine?.position.y = Float(-height/2) + 0.001 )
Important:- If you are creating new instance (nodeLine) on line number 33 for some specific reason. You should change it's name but if it is same which you initialised on line number 17. So you don't need to again initialised it.