LayoutLoopHunter
LayoutLoopHunter copied to clipboard
There's no Layout loop occur in example
I used the following example code in AppCoda
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
LayoutLoopHunter.setUp(for: view) {
print("Hello, world")
}
}
override func viewDidLayoutSubviews(){
super.viewDidLayoutSubviews()
view.setNeedsLayout() // loop creation
}
}
but there's no layout loop occur when i execute this example. And layoutSubviews
block was only executed two times.