Pop up Animation with UIVisualEffects is disabling button underneath

I am trying to add a pop up with a blurred view behind it to hide the view controller content. However the button to access this pop up is positioned underneath the blur effect which is disabling the button.
Does anyone know how to fix this?
Heres my code:

import UIKit

class View2: UIViewController {

var effect:UIVisualEffect!

@IBOutlet weak var VisualEffectview: UIVisualEffectView!

@IBOutlet var VDview: UIView!

override func viewDidLoad() {
    super.viewDidLoad()
    effect=VisualEffectview.effect
    VisualEffectview.effect=nil
    VDview.layer.cornerRadius=5

    // Do any additional setup after loading the view.
}

func openBOX(){
    self.view.addSubview(VDview)
    VDview.center = self.view.center
    VDview.transform = CGAffineTransform.init(scaleX: 1.3, y: 1.3)
    VDview.alpha = 0
    UIView.animate(withDuration: 0.4){
        self.VisualEffectview.effect = self.effect
        self.VDview.alpha = 1
        self.VDview.transform = CGAffineTransform.identity
    }
}

func closeBOX(){
    UIView.animate(withDuration:0.3, animations: {
        self.VDview.transform = CGAffineTransform.init(scaleX: 1.3, y: 1.3)
        self.VDview.alpha = 0
        self.VisualEffectview.effect = nil
    }) { (success:Bool) in
            self.VDview.removeFromSuperview()
    }
}


@IBAction func VDDopen(_ sender: UIButton) {
    openBOX()
}

@IBAction func VDclose(_ sender: UIButton) {
    closeBOX()
}





override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()

}

  • iOS 7.1 Slide To Unlock Text Animation
  • iOS Dim background when a view is shown
  • Animating an MKOverlayView
  • Error: Mutating method sent to immutable object for NSMutableArray from JSON file
  • iPhone - Detect the end of the animation
  • Using a loop for adding attributes to multiple UIImageViews