title: Pop Up View in Swift
body: <p>I have a popover view (without a tab bar) that is popped over to a view controller with a tab bar. In the view controller with a tab bar I set up a button to click, so that the view controller pops up: </p>
  
  <pre><code>  @IBAction func PopUpClicked(_ sender: UIButton) -&gt; Void {
  
          let popOverVC = UIStoryboard(name: "SpinningWheel", bundle: nil).instantiateViewController(withIdentifier: "PhotoPopUp") as! PopUpViewController
  
          self.addChildViewController(popOverVC)
  
          popOverVC.view.frame = self.view.frame
          self.view.addSubview(popOverVC.view)
          popOverVC.didMove(toParentViewController: self)
      }
  </code></pre>
  
  <p>And in the popOver view controller, i animated the pop over. </p>
  
  <pre><code>override func viewDidLoad() {
          super.viewDidLoad()
  
          self.view.backgroundColor = UIColor.black.withAlphaComponent(0.8)
  
  
          self.showAnimate()
  
          // Do any additional setup after loading the view.
      }
  
  
        func showAnimate()
          {
              self.view.transform = CGAffineTransform(scaleX: 1.3, y: 1.3)
              self.view.alpha = 0.0;
              UIView.animate(withDuration: 0.25, animations: {
                  self.view.alpha = 1.0
                  self.view.transform = CGAffineTransform(scaleX: 1.0, y: 1.0)
  
              });
          }
  
          func removeAnimate()
          {
              UIView.animate(withDuration: 0.25, animations: {
                  self.view.transform = CGAffineTransform(scaleX: 1.3, y: 1.3)
                  self.view.alpha = 0.0;
  
              }, completion:{(finished : Bool)  in
                  if (finished)
                  {
                      self.view.removeFromSuperview()
                  }
              });
          }
  </code></pre>
  
  <p>But when the popover happens, Everything has a faded black background, which I want except for the tab bar. I would like for the pop over View to also pop over the tabbar and for the faded black background to go over it.</p>
  
  <p>This is what I want it to look like: 
  <a href="https://i.stack.imgur.com/MRt9p.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MRt9p.png" alt="enter image description here"></a></p>
  
  <p>With the black faded background covering the tabbar</p>