Main.storyboard does not know of the constraints created in ViewController.swift. They are separate ways of creating views and constraints. If you would create that constraint in the storyboard, then it would appear in the list of constraints.
Thanks that helped me too though I had to dig a little more in order to understand.
If it helps others, you have to drag the outlet “currentQuestionLabelCenterXConstraint” to the constraint on the storyboard “Current Question Label.centerX = centerX”. Once you do that, then the outlet will be connected. You then do the same thing for the “nextQuestionLabelCenterXConstraint”.
You’re not connecting the outlet to the view directly per se; rather, you’re connecting the outlet to the already created constraints.
Hope that helps someone else and saves them from an hour+ struggling!
Thanks for your more detailed explanation, after also struggling with this.
I’m still not sure what to do.
You say ‘drag the outlet “currentQuestionLabelCenterXConstraint”’ but when I have storyboard showing, there is no mention of an outlet called currentQuestionLabelCenterXConstraint.
The diagram on page 150 shows a drag from the yellow View Controller icon above the layout, down onto the list of constraints, in which there are 10 constraints listed, whereas I have only 8. When I drag, and let go over one of the constraints, then the pop-up menu allows to choose currentQuestionLabelCenterXConstraint.
However, that name now replaces the name of the constraint in the list, so I still have only 8 constraints listed.
Have you managed to finish up with 10 constraints listed?