func iterateOverViewAndSubviews(view: UIView, block: (UIView) -> Void) { | |
block(view) | |
for subview in view.subviews { | |
iterateOverViewAndSubviews(view: subview, block: block) | |
} | |
} | |
func runCheckers() { | |
if let keyWindow = UIApplication.shared.keyWindow { | |
iterateOverViewAndSubviews(view: keyWindow) { (view) in | |
if checkersFail() { | |
fatalError() | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment