I want to specify leading, trailing constraints for one of my UIView object. But when I set that I was getting following kind of red warning:
Details about constraints error:
Why I was getting this kind of error that is big question in my mind!! I have tried with multiple combination of constraints too because I am aware that constraints always need in combination.
Set all 4 constraints:
How can I solve this error?
For the constraints in iOS development, you must define constraints for both side: vertical and horizontal. Like in the picture, you've created only constraints for horizontal side. The XCode requires the vertical side (top, botom, center_vertical, height)
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.