Unable to simultaneously satisfy constraints – No constraints in place

Let’s look at these one by one. “<NSAutoresizingMaskLayoutConstraint:0x84543d0 h=–& v=–& V:[UIView:0xa330270(768)]>” This is saying view 0xa330270 (A) must be 768 points high. “<NSLayoutConstraint:0xa338350 V:[UIView:0xa331260]-(-1)-| (Names: ‘|’:UIView:0xa330270 )>” This is saying view 0xa331260 (B)’s bottom edge must be a gap of -1 from the bottom of A, which is it’s superview. “<NSLayoutConstraint:0xa338390 V:|-(841)-[UIView:0xa331260] (Names: ‘|’:UIView:0xa330270 )>” … Read more

How to use UIView autoresizingMask property programmatically?

When setting the autoresizing mask for a view, use a bitwise inclusive OR (|) (Objective-C), or an array (Swift 2, 3, 4) to specify springs and struts. Springs are represented by specifying a mask (Objective-C or Swift, respectively): vertical spring: UIViewAutoresizingFlexibleHeight or .flexibleHeight horizontal spring: UIViewAutoresizingFlexibleWidth or .flexibleWidth Struts are represented by the lack of … Read more

Autoresizing masks programmatically vs Interface Builder / xib / nib

Yes, you have cited things correctly. Also, I agree that it feels a bit backwards, so for that reason I appreciate your post. You might like using a preprocessor Macro UIViewAutoresizingFlexibleMargins when making a UIView’s margin flexible in every direction. I put this in the precompiled header file so it gets included everywhere. #define UIViewAutoresizingFlexibleMargins … Read more