Why is XCode complaining about this line?

So I am trying to make a slider iPhone app, and everything is correct except these two lines:
// assigning the new value and setting it active:

        let constraintUpdate: NSLayoutConstraint = isShowing ? menuView.rightAnchor.constraint(equalTo:
            **view.leftAnchor, constant: -10) : menuView.rightAnchor.constraint(equalTo: self.view.**
**            leftAnchor, constant: self.menuView.frame.width)**
        rightAnchor = constraintUpdate
        rightAnchor?.isActive = true

Can anyone tell me what is wrong?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.