Welcome to the Treehouse Community
Looking to learn something new?
I need help with buttonPressLabel.
My code is exactly like the video. When I enter the code
buttonPressLabel.text = segueLabelText
I get a warning that says 'NSLayoutConstraint' does not have a member named text.
What is happening here? My code is the same as the video....
Iulian Popescu1,363 Points
If the code from video work properly than your code isn't the same. You should check again your code, but I think that your problem is in Interface builder. The error says that NSLayoutConstraint does not have a member called text, meaning that your buttonPressLabel isn't connected to a label, but to a constraint. Make sure that this IBOutlet is connected right, and if it still not working, leave a message. And, I recommend that next time when you post an issue, post and the code with variables declaration and so on.
Andrew WalzCourses Plus Student 5,719 Points
If anybody runs into this issue, it is because when you control click and drag the UIButton to create a IBOutlet, the constraint for the button was clicked instead. Delete the connection and retry it ensuring the control-click lands on the button and the connection it creates is an IBOutlet