Debugging Autolayout views

One of my favorite tricks for making it easier to see what is going on with various views and trying to fix autolayout constraints issues is to set a different background color for every UIView in Interface Builder. 

But sometimes, it gets pretty ugly and it's nice to see it like the user ultimately will. In that case, drop this in the UIViewController viewDidLoad to remove all the background color settings:

// Clear background colors from labels and buttons
for view in backgroundColoredViews {
view.backgroundColor = UIColor.clearColor()