Unable to activate constraint with anchors Unable to activate constraint with anchors ios ios

Unable to activate constraint with anchors


dan is right, you need to add sceneView as a subview before you can anchor it. Try something like this:

view.addSubview(sceneView)sceneView.anchor(top: self.view.topAnchor, left: self.view.leftAnchor, bottom: self.view.bottomAnchor, right: self.view.rightAnchor, paddingTop: 0, paddingLeft: 0, paddingBottom: 0, paddingRight: 0, width: 0, height: 0)