         }
     }
 
-    func height(forButtonText text: String?, width: CGFloat) -> CGFloat {
+    private func height(forButtonText text: String?, width: CGFloat) -> CGFloat {
         let insets = buttonInsets
         let textSize = CGSize(
-            width: width - (insets?.left ?? 0.0) - (insets?.right ?? 0.0),
+            width: width - insets.left - insets.right,
             height: CGFloat.greatestFiniteMagnitude)
         var attributes: [NSAttributedString.Key: Any]?
         if let font1 = button?.titleLabel?.font {

        button.contentEdgeInsets = .zero
        addSubview(button)
        self.button = button
        buttonInsets = UIEdgeInsets(top: 5, left: 5, bottom: 5, right: 15)
        backgroundColor = UIColor.clear
        updateAppearance()
    }

        }
    }
    private weak var label: UILabel?
    private let buttonInsets = UIEdgeInsets(top: 5, left: 5, bottom: 5, right: 15)

    override init(frame: CGRect) {
        super.init(frame: frame)
