                 }
             }
         }
-        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)
                 
             }
         }

import Foundation
import UIKit


@objc public protocol PokeModalDelegate {
    optional func pokeModalWillHide()
}

public class PokeModal: UIResponder {
    
    private var containerView: UIView?
    private var buttonImage: UIImage?
    private var titleLabel: UILabel?
    private var contentLabel: UILabel?
    private var closeButton: UIButton?
    private var isShown: Bool? = false
    private var view: UIView?
    private var initialPoint: CGPoint?
    
    public var delegate: PokeModalDelegate?
    
    public var titleText: String = "TITLE" {
        didSet { }
    }
    
    public var contentText: String = "Content" {
        didSet { }
    }
    
    let screenHeight = UIScreen.mainScreen().bounds.height
    let screenWidth = UIScreen.mainScreen().bounds.width
    
    public init(view: UIView) {
        super.init()

        
        containerView = UIView(frame: CGRect(x: 30, y: screenHeight, width: screenWidth - 60
            , height: screenHeight / 2.0))
        containerView?.backgroundColor = UIColor.white
        
        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 = CGSize.zero
        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 = Bundle(for: self.classForCoder)
        if let bundleURL = podBundle.url(forResource: "PokeModal", withExtension: "bundle") {
            if let bundle = Bundle(url: bundleURL) {
                buttonImage = UIImage(named: "close", in: bundle, compatibleWith: nil)
            }else {
                assertionFailure("Could not load the bundle")
            }
