     {
         if completed {
             self.dimmingView.removeFromSuperview()
+            self.closeButton.removeFromSuperview()
         }
     }
 }

    {
        self.setupCloseButton()
        self.closeButton.center = self.presentedView().frame.origin
        self.containerView.addSubview(self.closeButton)
    }
    
    public override func dismissalTransitionWillBegin()
    {
        self.closeButton.removeFromSuperview()
        if let transitionCoordinator = self.presentingViewController.transitionCoordinator() {
            transitionCoordinator.animateAlongsideTransition({ (context: UIViewControllerTransitionCoordinatorContext!) -> Void in
                self.dimmingView.alpha = 0.0
            }, completion: nil)
        }
    }

        if let transitionCoordinator = self.presentingViewController.transitionCoordinator() {
            transitionCoordinator.animateAlongsideTransition({(context: UIViewControllerTransitionCoordinatorContext!) -> Void in
                self.dimmingView.alpha  = 1.0
            }, completion:nil)
        }
    }
    
