Skip to content

Instantly share code, notes, and snippets.

@chriswebb09
Created May 11, 2017 08:56
Show Gist options
  • Save chriswebb09/0808efaad89621f8a86384e791869d24 to your computer and use it in GitHub Desktop.
Save chriswebb09/0808efaad89621f8a86384e791869d24 to your computer and use it in GitHub Desktop.
class ViewTraverser {
// Traverse superviews
private func checkForSuper(view: UIView?, views: [Int: UIView]) -> UIView? {
guard let view = view else { return nil }
if views[view.tag] != nil {
return view
}
return nil
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment