FittableFontLabel
FittableFontLabel copied to clipboard
multiline size state
private func multiLineSizeState(rect: CGRect, size: CGSize) -> FontSizeState { // if rect within 10 of size if rect.height < size.height + 10 && rect.height > size.height - 10 && rect.width > size.width + 10 && rect.width < size.width - 10 { return .fit } else if rect.height > size.height || rect.width > size.width { return .tooBig } else { return .tooSmall } }
Hi, rect.width > size.width + 10 && rect.width < size.width - 10, Is there any mistake here?