     }
     
     func buttonTap() {
-        closeView(true);
+        closeView(true, source: .Close);
     }
     
     func addCancelAction(action: ()->Void) {

    }

    func cancelButtonTap() {
        closeView(false);
    }
    
    func closeView(withCallback:Bool) {
        UIView.animateWithDuration(0.3, delay: 0, usingSpringWithDamping: 0.7, initialSpringVelocity: 0.5, options: nil, animations: {
            self.containerView.center.y = self.rootViewController.view.center.y + self.viewHeight!
            }, completion: { finished in

                    self.view.alpha = 0
                    }, completion: { finished in
                        if withCallback == true {
                            if let action = self.closeAction where source == .Close {
                                action()
                            }
                        }
                        self.removeView(withCallback, source: source)
                })
                
        })
    }
    
    func removeView(withCallback:Bool, source:ActionType = .Cancel) {
        isAlertOpen = false
        self.view.removeFromSuperview()
        if withCallback {
            if let action = self.cancelAction where source == .Cancel {
                action()
            }
        }
    }
    
