Reputation: 80271
I am trying to get rid of those annoying warnings in Interface Builder, but I do not understand what it is complaining about (all Interface Builder, no code):
I have specified a fixed with, fixed height and fixed distances to right and top.
Yet the warning tells me
Needs Constraints for: Y position, height
Needs Constraints for: X position, width
Can someone please explain how these are constraints are not sufficient?
Edit
Also, when using the "automatic" add constraints commands, it does nothing and the errors remain.
Upvotes: 6
Views: 2458
Reputation:
I would suspect the superview is not pinned to a size in interface builder. Autolayout constraints seem to solve everything simultaneously and an error message that looks like it relates to one view can just as easily relate to the other view in the relationship.
What is - (NSArray *)constraintsAffectingLayoutForAxis:(UILayoutConstraintAxis)axis
telling you?
Upvotes: 1