         popupView.transform = CGAffineTransform(scaleX: 1.05, y: 1.05)
         popupView.alpha = 0.0
         
-        UIView.animate(withDuration: animationDuration, delay: 0.0, options: UIViewAnimationOptions.curveEaseInOut, animations: { () -> Void in
+        UIView.animate(withDuration: animationDuration, animations: { () -> Void in
             self.overlayView.alpha = 1.0
             self.popupView.transform = CGAffineTransform.identity
             self.popupView.alpha = 1.0
-        }, completion: nil)
+        }, completion: { (finished) -> Void in
+            
+        })
     }
     
     // MARK: - Hide

            popupViewEndRect = CGRect(x: -popupViewSize.width, y: self.popupView.frame.origin.y, width: popupViewSize.width, height: popupViewSize.height)
        }
        
        UIView.animate(withDuration: self.animationDuration, delay: 0.0, options: UIViewAnimationOptions.curveEaseInOut, animations: { () -> Void in
            
            self.popupView.frame = popupViewEndRect
            self.overlayView.alpha = 0.0
            
        }) { (finished) -> Void in
            self.overlayView.isHidden = true
            self.popupView.isHidden = true
            
            self.removeFromSuperview()
        }
    }
    
    fileprivate func zoomOutAnimation() {
        UIView.animate(withDuration: animationDuration, delay: 0.0, options: UIViewAnimationOptions.curveEaseInOut, animations: { () -> Void in
            self.overlayView.alpha = 0.0
            self.popupView.transform = CGAffineTransform(scaleX: 0.01, y: 0.01)
            self.popupView.alpha = 0.0

    
    // MARK: - Constructors
    
    convenience init(buttonAlignment: YKPopupDialogButtonAlignment) {
        self.init(frame:CGRect.zero)
        
        self.buttonAlignment = buttonAlignment
        
        commonInit()
    }
    
    required public init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        
