title: Get the parentViewController instance
body: <p>I have two classes: <code>MyViewController: UIViewController</code> and <code>TheView: UIView</code>. Inside the <code>MyViewController</code> i have declared and object <code>var theView: TheView</code> and a boolean flag like <code>var flag: Bool = false</code>. How do I get the <code>flag</code> value from inside <code>TheView</code> class without passing if from <code>MyViewController</code>? I have tried methods like <code>if let vc = self.parentViewController as? MyViewController { }</code> but unsuccessfully.</p>