     public override func layoutSubviews() {
         super.layoutSubviews()
         
+        rearrangeViews()
+    }
+    
+    private func rearrangeViews() {
         for tagView in tagViews {
             tagView.removeFromSuperview()
         }

            tagView.removeFromSuperview()
        }
        tagViews = []
        setNeedsLayout()
    }
    
    // MARK: - Events

            for tagView in tagViews {
                tagView.paddingX = paddingX
            }
            rearrangeViews()
        }
    }
    @IBInspectable public var marginY: CGFloat = 2 {
        didSet {
            rearrangeViews()
        }
    }
    @IBInspectable public var marginX: CGFloat = 5 {
        didSet {
            rearrangeViews()
        }
    }
    public var textFont: UIFont = UIFont.systemFontOfSize(12) {
