I have added a UIView on storyboard in which i set a constraints to top,left,bottom,right as shown below
As you can see in the image, orange bordered line indicates that i misplaced the view.
My UIView position is 0,20,320,150. I am not sure why xcode shows the warning eventhough i set a correct constraint.
I am using Xcode 7 beta version.
Your constraints doesn't respect you frame.
You have frame
0, 20, 320, 150
, but constraints showTrailing Space: -20
andLeading Space: -20
. Set both of them to-16
and warnings will disappear.You need set
-16
because your constraints related to margins, not to actual bounds. Margin has16
points offset from bounds.