title: How to keep a UIView always showing over multiple views
body: <p>I wish to create and present a view over each view controller in my app allowing users to interact with it or the view controllers beneath it. I want the view to always appear on top of whatever view I may present or segue to.</p>
  
  <p>I have a custom UIView that appears when users tap a table view cell. Within the didSelectRowAt tableView function I have tried:</p>
  
  <pre><code>(UIApplication.shared.delegate as! AppDelegate).window?.addSubview(self.subView!)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>self.view.addSubview(self.subView!)
  </code></pre>
  
  <p>Both function similarly with the view appearing over the current View controller and allowing users to interact with the table still. But when I present a new ViewController the subView disappears as it has not been added to the new View.</p>