LayoutLoopHunter

The library helps to catch the OOMs caused by Autolayout Feedback Loop by replicating the behavior of UIViewLayoutFeedbackLoopDebuggingThreshold in the live code.

This is the final result of the runtime tutorial on AppCoda.

Installation

LayoutLoopHunter is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'LayoutLoopHunter'
Ruby

and run pod install in your terminal.

Alternatively, you can manually add the files from the LayoutLoopHunter directory to your project.

Usage

Please use the setUp method to set up tracking for your UIView:

static func setUp(for view: UIView, threshold: Int = 100, onLoop: @escaping () -> ())
Swift

The callback will be called when the layoutSubviews() method is called a certain amount of times in a single run loop.

Example

LayoutLoopHunter.setUp(for: view) {
    print("Hello, world")
}
Swift

GitHub

Runtime-based setup for tracking autolayout feedback loopsRead More

Latest commit to the master branch on 1-10-2019
Download as zip