         dismissView.userInteractionEnabled = true
         textLabel.userInteractionEnabled = true
         
-        dismissView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: "iconTapped"))
-        textLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: "labelTapped"))
+        dismissView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(TagView.iconTapped)))
+        textLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(TagView.labelTapped)))
     }
     
     public required init?(coder aDecoder: NSCoder) {
         fatalError("init(coder:) has not been implemented")
     }
     
-    public init(text: String){
-        
+    public init(text: String) {
         dismissView = UIView()
         icon = UIImageView()
         textLabel = UILabel()

    public var removeOnDismiss = true
    public var resizeToFit = true
    
    public var tags = [TagView](){
        didSet {
            layoutSubviews()
        }
    }
    public var padding = 5{
        didSet {
            layoutSubviews()
        }

        dismissView.userInteractionEnabled = true
        textLabel.userInteractionEnabled = true
        
        dismissView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(TagView.iconTapped)))
        textLabel.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(TagView.labelTapped)))
        
        self.text = text
        self.layoutSubviews()
