Skip to content

Instantly share code, notes, and snippets.

Last active August 10, 2021 06:46
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save michaeleisel/39f53b1f640f6533e4f0754b72ed862f to your computer and use it in GitHub Desktop.
func iterateOverViewAndSubviews(view: UIView, block: (UIView) -> Void) {
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() {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment