Reputation: 42
so am following a guy on youtube who wrote in the CGrect:
nameLabel.frame = CGRect( x: userProfileImage.right + 5,
this code is supposed to put the nameLabel to the right of the userProfileImage but when I use the same code it tells me Value of type 'UIImageView' has no member 'right'
can someone help me figure out why it is not working?
the black screen is the code of the guy on youtube with no errors, the white is mine. Same Xcode version.
Upvotes: 0
Views: 217
Reputation: 234
That's because UIView
does not have such a member, this guy is probably using an extension or library. Try userProfileImage.frame.maxX
.
Upvotes: 3