Skip to content

Instantly share code, notes, and snippets.

@chriswebb09
Created May 11, 2017 08:58
Show Gist options
  • Save chriswebb09/5a82a240c6c05a6c407a2aad1e862a7d to your computer and use it in GitHub Desktop.
Save chriswebb09/5a82a240c6c05a6c407a2aad1e862a7d to your computer and use it in GitHub Desktop.
import UIKit
class ViewController: UIViewController {
let viewOne = UIView()
let viewTwo = UIView()
let viewThree = UIView()
let intermediaryView = UIView()
let viewSuper = UIView()
let traverser = ViewTraverser()
override func viewDidLoad() {
super.viewDidLoad()
viewOne.tag = 22
viewTwo.tag = 23
viewSuper.tag = 10
view.tag = 12
intermediaryView.addSubview(viewOne)
intermediaryView.tag = 8
viewThree.tag = 33
viewThree.addSubview(viewTwo)
view.addSubview(viewThree)
view.addSubview(intermediaryView)
// logic to check our common superviews goes here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment