     
     @IBInspectable
     open var secondaryHighlightedImage: UIImage?
+    
+    private var addCenterConstraints = false
     
     private func configureVertically() {
         guard verticallyAlign else { return }

            return size
        }
    }

    open override func updateConstraints() {
        guard verticallyAlign else { return super.updateConstraints()}
        guard (secondaryImage == nil) else { return super.updateConstraints()}
        
        imageView?.translatesAutoresizingMaskIntoConstraints = false
        titleLabel?.translatesAutoresizingMaskIntoConstraints = false
        
        if let imageView = self.imageView {
            let imageConstraintCenterX = NSLayoutConstraint(item: imageView, attribute: .centerX, relatedBy: .equal, toItem: imageView.superview, attribute: .centerX, multiplier: 1.0, constant: 0)
            imageView.superview?.addConstraint(imageConstraintCenterX)
        }
        
        if let titleLabel = self.titleLabel {
            titleLabel.textAlignment = .center
            let imageConstraintCenterX = NSLayoutConstraint(item: titleLabel, attribute: .centerX, relatedBy: .equal, toItem: titleLabel.superview, attribute: .centerX, multiplier: 1.0, constant: 0)
            titleLabel.superview?.addConstraint(imageConstraintCenterX)
        }
        super.updateConstraints()
    }
}

    override open func draw(_ rect: CGRect) {
        configureVertically()
        invalidateIntrinsicContentSize()
        super.draw(rect)
    }
    
