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

            for tagView in tagViews {
                tagView.textFont = textFont
            }
            layoutIfNeeded()
        }
    }
    
    @IBOutlet public var delegate: TagListViewDelegate?

    var tagViews: [TagView] = []
    var tagViewHeight: CGFloat = 0
    var rows = 0 {

            for tagView in tagViews {
                tagView.paddingY = paddingY
            }
            rearrangeViews()
        }
    }
    @IBInspectable public var paddingX: CGFloat = 5 {
