 
 extension UILabel {
     
-    func addCharactersSpacing(spacing: CGFloat, text: String) {
+    func addCharactersSpacing(_ spacing: CGFloat, text: String) {
         let attributedString = NSMutableAttributedString(string: text)
         attributedString.addAttribute(NSKernAttributeName, value: spacing, range: NSMakeRange(0, text.characters.count))
         self.attributedText = attributedString

            if titleLabel != nil {
                titleLabel?.font = UIFont(name: "Avenir-Black", size: 15)
                titleLabel?.addCharactersSpacing(3, text: self.titleText)
                titleLabel?.layer.addLateralBorder(UIRectEdge.Bottom, color: UIColor.blackColor(), thickness: 1)
                self.containerView?.addSubview(titleLabel!)
            }
            
            if contentLabel != nil {
                contentLabel?.font = UIFont(name: "Avenir-Book", size: 12)
                contentLabel?.text = self.contentText
                contentLabel?.backgroundColor = UIColor.clearColor()
                self.containerView?.addSubview(contentLabel!)
            }
            
            self.view!.addSubview(self.containerView!)
            self.view!.bringSubviewToFront(self.containerView!)
            
            UIView.animateWithDuration(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
    }
    
    public func dismissMenu() {
        UIView.animateWithDuration(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!()
                }
        })
        
    }

                }
            }
        }
        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.animate(withDuration: 0.4, delay: 0.0, options: UIViewAnimationOptions.curveEaseOut, animations: {
                    sender.view?.center = self.initialPoint!
                }, completion: nil)
                
            }
        }
