Skip to content

Instantly share code, notes, and snippets.

@ManWithBear
Created October 18, 2016 11:48
Show Gist options
  • Save ManWithBear/9724397ad88ba0bee04a4d65a9d95fa4 to your computer and use it in GitHub Desktop.
Save ManWithBear/9724397ad88ba0bee04a4d65a9d95fa4 to your computer and use it in GitHub Desktop.
Help to understand layout issues
1. Symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints.
2. Add debug command:
- ObjC: po [[UIWindow keyWindow] _autolayoutTrace]
- Swift: expr -l objc++ -O -- [[UIWindow keyWindow] _autolayoutTrace]
3. Colorfy bad views:
expr ((UIView *)0x7f9ea3d43410).backgroundColor = [UIColor redColor]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment