How to debug Auto Layout
onmyway133 opened this issue · 0 comments
onmyway133 commented
hasAmbiguousLayout
Returns whether the constraints impacting the layout of the view incompletely specify the location of the view.
exerciseAmbiguityInLayout
This method randomly changes the frame of a view with an ambiguous layout between its different valid values, causing the view to move in the interface. This makes it easy to visually identify what the valid frames are and may enable the developer to discern what constraints need to be added to the layout to fully specify a location for the view.
_autolayoutTrace
This returns a string describing the whole view tree which tells you when a view has an ambiguous layout.
NSLayoutConstraint identifier
The name that identifies the constraint.
UIViewAlertForUnsatisfiableConstraints
DETECTED_MISSING_CONSTRAINTS
https://forums.developer.apple.com/thread/63811