Last active
July 7, 2020 17:45
-
-
Save xNekOIx/6121100 to your computer and use it in GitHub Desktop.
iOS AutoLayout debug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
po [[UIWindow keyWindow] _autolayoutTrace] // prints layouts ambiguity | |
po [UIViewController _printHierarchy] // prints view controllers hierarchy | |
po [view constraintsAffectingLayoutForAxis:0] // horizontal | |
po [view constraintsAffectingLayoutForAxis:1] // vertical | |
[view hasAmbiguousLayout] // BOOL | |
[view exerciseAmbiguityInLayout] // visualizing ambiguity | |
UIViewAlertForUnsatisfiableConstraints // symbolic breakpoint | |
UIConstraintBasedLayoutDebugging // symbolic breakpoint | |
expr (void)[CATransaction flush] | |
command alias objcpo po -l objc++ -O -- | |
command alias objcexpr expr -l objc++ -O -- | |
Swift: | |
e let $sv = unsafeBitCast(0x7fe33d355b10, UIStackView.self) | |
po $sv.constraintsAffectingLayoutForAxis(.Horizontal) | |
po $sv.constraintsAffectingLayoutForAxis(.Vertical) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment