         var underlineView:UIView?
         var underlineHeight: CGFloat = 4.0 {
             didSet {
-                setNeedsUpdateConstraints()
+                if oldValue != underlineHeight {
+                    setNeedsUpdateConstraints()
+                }
             }
         }
         public var contentColor:UIColor?

        private func configureConstraints() {
            if let underline = underlineView {
                underline.translatesAutoresizingMaskIntoConstraints = false
                let heightConstrain = underline.heightAnchor.constraint(equalToConstant: underlineHeight)
                variableConstraints.append(heightConstrain)
                heightConstrain.isActive = true
                underline.leadingAnchor.constraint(equalTo: contentView.leadingAnchor).isActive = true
                underline.trailingAnchor.constraint(equalTo: contentView.trailingAnchor).isActive = true
                underline.bottomAnchor.constraint(equalTo: contentView.bottomAnchor).isActive = true

    @objc public dynamic var underlineHeight: CGFloat {
        get { return _underlineHeight }
        set {
            if newValue != _underlineHeight {
                _underlineHeight = newValue
                reloadSegments()
            }
        }
    }
    
