             return self.font.pointSize
         }
 
-
         let constraintSize = numberOfLines == 1 ?
             CGSize(width: CGFloat.greatestFiniteMagnitude, height: rectSize.height) :
             CGSize(width: rectSize.width, height: CGFloat.greatestFiniteMagnitude)


    func currentAttributedStringAttributes() -> [String : Any] {
        var newAttributes = [String: Any]()
        attributedText?.enumerateAttributes(in: NSRange(0..<(text?.characters.count ?? 0)), options: .longestEffectiveRangeNotRequired, using: { attributes, range, stop in
            newAttributes = attributes
        })
        return newAttributes

private extension UILabel {

    enum FontSizeState {
        case fit, tooBig, tooSmall
    }

    func binarySearch(string: String, minSize: CGFloat, maxSize: CGFloat, size: CGSize, constraintSize: CGSize) -> CGFloat {
