UIWindow has the private method _autolayoutTrace that helps you to find ambigous layouts. It's very nice and convenient and outputs something like this:
*<UIWindow:0x13436fd0> - AMBIGUOUS LAYOUT
| *<UIView:0xd5e0b30>
| | *<PbJellyContentContainerView:0xd5e0ff0>
| | | *<UIView:0x20710ee0>
| | | | *<PbMapContainerView:0x20710c90>
| | | | | <MKMapView:0x2070df70>
| | | | | | <UIView:0xd1cca20>
| | | | | | | <MKBasicMapView:0xd1cd020>
....
My question is not about any ambiguity. It is about the asterisk in front of some views. What is its meaning?
My guess would be that it marks all views that are using auto layout. But how does the system determine this?
Update:
It seems that the asterisk marks all views that either have at least one constraint set or that have a subview that has at least one constraint set.
Setting translatesAutoresizingMaskIntoConstraints to false without setting a constraint doesn't give the asterisk.
This is the legend for -[UIView _autolayoutTrace]
from WWDC 2015 session #219 video at 31:00
* - is laid out with auto layout
+ - is laid out manually, but is represented in the layout engine because translatesAutoresizingMaskIntoConstraints = YES
• - layout engine host
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With