I'm trng to design a screen for iPad using interface builder. I have an empty view and I added an UIImageView as a wallpaper with 4 constraints:
Leading Space to superview = 0
Trailing Space to superview = 0;
Top Space to superview = 0;
Bottom Space to superview = 0;
In this way, the Image resizes perfectly in landscape mode.
I inserted some debug code in viewDidAppear: and didRotateFromInterfaceOrientation:
NSLog(@"%@", [[UIWindow keyWindow] _autolayoutTrace]);
Only with this elements on the screen I get an ambigous layout output in portrait mode:
*<UIWindow:0x754c210>
| *<UIView:0x75555f0> - AMBIGUOUS LAYOUT
| | *<UIImageView:0x7555650> - AMBIGUOUS LAYOUT
In landscape mode, seems to work fine
*<UIWindow:0x754c210>
| *<UIView:0x75555f0>
| | *<UIImageView:0x7555650>
After that I added more controls and the screen seems to work fine, but I cannot get rid of that ambiguous layout. What I'm doing wrong?