I have a custom cell inside an UITableView
. Within that custom cell I am trying to put an image and to vertically align it horizontally. As soon as I do that I get that red line.
I have clicked the update frames button, there were no pop up of a menu to select any options.
Heres an image to get a better understanding.
What do I need to do to fix it?
The constraints for your image view are not sufficient for Auto Layout to know where & how big the image view should be:
Constraints for views need to specify the position (x, y) plus the size of the view (width, height).
To fix your issue, add constraints for:
You could also press Add missing constraints in the menu that pops up when you press that |△|
button, but I discourage you from doing so, because then it might add constraints you were not actually looking for.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.