This file contains hidden or 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
| function debounce(callback, wait, immediate = false) { | |
| let timeout = null | |
| return function() { | |
| const callNow = immediate && !timeout | |
| const next = () => callback.apply(this, arguments) | |
| clearTimeout(timeout) | |
| timeout = setTimeout(next, wait) |
This file contains hidden or 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 |