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() {

    // Do any additional setup after loading the view.

func openBOX(){
    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

@IBAction func VDDopen(_ sender: UIButton) {

@IBAction func VDclose(_ sender: UIButton) {

override func 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