                 }
             }
         }
-        sender.setTranslation(CGPointZero, inView: self.view)
-        
-        if sender.state == UIGestureRecognizerState.Ended {
+        sender.setTranslation(CGPoint.zero, in: self.view)
+        
+        if sender.state == UIGestureRecognizerState.ended {
             if (sender.view?.center.y)! - (self.initialPoint?.y)! > CGFloat(100) {
                 self.dismissMenu()
             }
             else {
-                UIView.animateWithDuration(0.4, delay: 0.0, options: UIViewAnimationOptions.CurveEaseOut, animations: {
+                UIView.animate(withDuration: 0.4, delay: 0.0, options: UIViewAnimationOptions.curveEaseOut, animations: {
                     sender.view?.center = self.initialPoint!
-                    }, completion: nil)
+                }, completion: nil)
                 
             }
         }

        
        containerView = UIView(frame: CGRect(x: 30, y: screenHeight, width: screenWidth - 60
            , height: screenHeight / 2.0))
        containerView?.backgroundColor = UIColor.whiteColor()

        containerView?.layer.borderWidth = 0.0
        containerView?.layer.borderColor = UIColor ( red: 0.2608, green: 0.8168, blue: 0.8177, alpha: 1.0 ).CGColor
        
        containerView?.layer.shadowOffset = CGSizeZero
        containerView?.layer.shadowOpacity = 1
        containerView?.layer.shadowColor = UIColor ( red: 0.6699, green: 0.6941, blue: 0.7486, alpha: 1.0 ).CGColor
        containerView?.layer.shadowRadius = 10
        
        // Dealing with bundles...
        let podBundle = NSBundle(forClass: self.classForCoder)
        if let bundleURL = podBundle.URLForResource("PokeModal", withExtension: "bundle") {
            if let bundle = NSBundle(URL: bundleURL) {
                buttonImage = UIImage(named: "close", inBundle: bundle, compatibleWithTraitCollection: nil)
            }else {
                assertionFailure("Could not load the bundle")
            }

            if titleLabel != nil {
                titleLabel?.font = UIFont(name: "Avenir-Black", size: 15)
                titleLabel?.addCharactersSpacing(3, text: self.titleText)
                titleLabel?.layer.addLateralBorder(UIRectEdge.bottom, color: UIColor.black, thickness: 1)
                self.containerView?.addSubview(titleLabel!)
            }
            
            if contentLabel != nil {
                contentLabel?.font = UIFont(name: "Avenir-Book", size: 12)
                contentLabel?.text = self.contentText
                contentLabel?.backgroundColor = UIColor.clear
                self.containerView?.addSubview(contentLabel!)
            }
            
            self.view!.addSubview(self.containerView!)
            self.view!.bringSubview(toFront: self.containerView!)
            
            UIView.animate(withDuration: 0.2, delay: 0.0, options: UIViewAnimationOptions.curveEaseOut, animations: {
                self.containerView?.frame = CGRect(x: 30, y: self.screenHeight / 2.0, width: self.screenWidth - 60, height: self.screenHeight / 2.0)
            }, completion: nil)
            
            
        }
        isShown = true
    }
    
    open func dismissMenu() {
        UIView.animate(withDuration: 0.1, delay: 0.0, options: UIViewAnimationOptions.curveEaseOut, animations: {
            self.containerView?.frame = CGRect(x: 30, y: self.screenHeight, width: self.screenWidth - 60, height: self.screenHeight / 2.0)
        }, completion: { (Bool) -> Void in
            self.removeSubviews()
            self.containerView!.removeFromSuperview()
            self.isShown = false
            if self.delegate != nil {
                self.delegate?.pokeModalWillHide!()
            }
        })
        
    }
