I am trying to debug the user interface layout, and all the elements that I added in the code are marked as [self.element setTranslatesAutoresizingMaskIntoConstraints: NO]; The only thing set in the XIB file is the background color in the view (one of many types in tabbed view.
When I look at NSLog, I see the following:
*<UIWindow:0xc352370> - AMBIGUOUS LAYOUT | *<UILayoutContainerView:0xc3651b0> | | *<UINavigationTransitionView:0xc355b40> | | | *<UIViewControllerWrapperView:0xbd3e250> | | | | *<UILayoutContainerView:0xbd3da60> | | | | | *<UITransitionView:0xbd46ed0> | | | | | | *<UIViewControllerWrapperView:0xc09a450> | | | | | | | *<UIView:0xbd51f40> | | | | | | | | *<_UILayoutGuide:0xbd51fa0> - AMBIGUOUS LAYOUT | | | | | | | | *<_UILayoutGuide:0xbd50a10> - AMBIGUOUS LAYOUT | | | | | | | | *<UIButton:0xc064170> - AMBIGUOUS LAYOUT | | | | | | | | | *<UIButtonLabel:0xc09d640> | | | | | | | | *<UILabel:0xc073990> - AMBIGUOUS LAYOUT | | | | | | | | *<UIButton:0xc0576a0> - AMBIGUOUS LAYOUT | | | | | | | | | *<UIButtonLabel:0xc095290> | | | | | | | | *<UIButton:0xc096640> - AMBIGUOUS LAYOUT | | | | | | | | | <UIButtonLabel:0xc096820> | | | | | | | | *<UIButton:0xc098b70> - AMBIGUOUS LAYOUT | | | | | | | | | <UIButtonLabel:0xc098cb0> | | | | | | | | *<UIButton:0xc09a4c0> - AMBIGUOUS LAYOUT | | | | | | | | | <UIButtonLabel:0xc09a6d0> | | | | | | | | *<UILabel:0xc09c9d0> - AMBIGUOUS LAYOUT | | | | | | | | *<UILabel:0xc09cc60> - AMBIGUOUS LAYOUT | | | | | | | | *<UIButton:0xc09ce00> - AMBIGUOUS LAYOUT | | | | | | | | | <UIButtonLabel:0xc09d010> | | | | | | | | *<UILabel:0xc0a25f0> - AMBIGUOUS LAYOUT | | | | | | | | *<UIButton:0xc0a2800> - AMBIGUOUS LAYOUT | | | | | | | | | <UIButtonLabel:0xc0a2a10> | | | | | | | | *<UILabel:0xc0a5720> - AMBIGUOUS LAYOUT | | | | | <UITabBar:0xc356c00> | | | | | | <_UITabBarBackgroundView:0xbe28cc0> | | | | | | | <_UIBackdropView:0xbe29100> | | | | | | | | <_UIBackdropEffectView:0xbe296e0> | | | | | | | | <UIView:0xbe29780> | | | | | | <UITabBarButton:0xbd42000> | | | | | | | <UITabBarSwappableImageView:0xbd41050> | | | | | | | <UITabBarButtonLabel:0xbd43320> | | | | | | <UITabBarButton:0xbd462e0> | | | | | | | <UITabBarSwappableImageView:0xbd45d60> | | | | | | | <UITabBarButtonLabel:0xbd45c70> | | | | | | <UITabBarButton:0xbd47770> | | | | | | | <UITabBarSwappableImageView:0xbd48a90> | | | | | | | <UITabBarButtonLabel:0xbd486c0> | | | | | | <UITabBarButton:0xbd4c0c0> | | | | | | | <UITabBarSwappableImageView:0xbd4c220> | | | | | | | <UITabBarButtonLabel:0xbd4aea0> | | | | | | <UIImageView:0xbe29ed0> | | <UINavigationBar:0xc06c4a0> | | | <_UINavigationBarBackground:0xc05e720> | | | | <_UIBackdropView:0xc357d70> | | | | | <_UIBackdropEffectView:0xc3639a0> | | | | | <UIView:0xc355470> | | | | <UIImageView:0xc071980> | | | <UINavigationItemView:0xc074c80> | | | | <UILabel:0xc083730> | | | <_UINavigationBarBackIndicatorView:0xc36edb0> po [ (lldb) po [0xbd51fa0 constraintsAffectingLayoutForAxis:0] <__NSArrayM 0xbd39190>( ) (lldb) po [0xbd50a10 constraintsAffectingLayoutForAxis:0] <__NSArrayM 0x1121f8f0>( ) (lldb) po [0xc064170 constraintsAffectingLayoutForAxis:0] <__NSArrayM 0xc0a14e0>( <NSLayoutConstraint:0xc093aa0 H:|-(NSSpace(20))-[UIButton:0xc064170] (Names: '|':UIView:0xbd51f40 )>, <NSLayoutConstraint:0xc093b30 UIButton:0xc064170.width == UIButton:0xc0576a0.width>, <NSLayoutConstraint:0xc093be0 H:[UIButton:0xc064170]-(20)-[UILabel:0xc073990]>, <NSLayoutConstraint:0xc093c10 UILabel:0xc073990.width == UIButton:0xc0576a0.width>, <NSLayoutConstraint:0xc096530 H:[UILabel:0xc073990]-(20)-[UIButton:0xc0576a0]>, <NSLayoutConstraint:0xc096590 H:[UIButton:0xc0576a0]-(NSSpace(20))-| (Names: '|':UIView:0xbd51f40 )>, <NSAutoresizingMaskLayoutConstraint:0xc0af130 h=--& v=--& H:[UIView:0xbd51f40(768)]> ) (lldb) po [0xc09a4c0 constraintsAffectingLayoutForAxis:0] <__NSArrayM 0xc36a0a0>( <NSLayoutConstraint:0xc09c9a0 H:|-(<=0)-[UIButton:0xc09a4c0] (Names: '|':UIView:0xbd51f40 )>, <NSContentSizeLayoutConstraint:0xc0ad530 H:[UIButton:0xc09a4c0(110)] Hug:250 CompressionResistance:750>
As you can see from the po commands, I get NSAutoresizingMasktLayoutContraints. I thought this should not be?
How can I guarantee that I will not get this?
source share