From 82ce4a00182c83fe86efd4b6fba59e344f642704 Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Tue, 29 May 2012 07:48:49 -0700 Subject: [PATCH] [Issue #91] Adding note about infinite loop bug for adjustsFontSize with numberOfLines > 1 in iOS 4 --- TTTAttributedLabel.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TTTAttributedLabel.h b/TTTAttributedLabel.h index 953e36f4..3fc3a027 100644 --- a/TTTAttributedLabel.h +++ b/TTTAttributedLabel.h @@ -53,9 +53,9 @@ extern NSString * const kTTTStrikeOutAttributeName; - `text` - This property now takes an `id` type argument, which can either be a kind of `NSString` or `NSAttributedString` (mutable or immutable in both cases) - `lineBreakMode` - This property displays only the first line when the value is `UILineBreakModeHeadTruncation`, `UILineBreakModeTailTruncation`, or `UILineBreakModeMiddleTruncation` - - `adjustsFontsizeToFitWidth` - This property is effective for any value of `numberOfLines` greater than zero + - `adjustsFontsizeToFitWidth` - Supported in iOS 5 and greater, this property is effective for any value of `numberOfLines` greater than zero. In iOS 4, setting `numberOfLines` to a value greater than 1 with `adjustsFontSizeToFitWidth` set to `YES` may cause `sizeToFit` to execute indefinitely. - @warning Any properties changed on the label after setting the text will not be reflected until a subsequent call to `setText:` or `setText:afterInheritingLabelAttributesAndConfiguringWithBlock:`. This is to say, order of operations matters in this case. For example, if the label text color is originally black when the text is set, changing the text color to red will have no effect on the display of the label until the text is set once again. + @warning Any properties changed on the label after setting the text will not be reflected until a subsequent call to `setText:` or `setText:afterInheritingLabelAttributesAndConfiguringWithBlock:`. This is to say, order of operations matters in this case. For example, if the label text color is originally black when the text is set, changing the text color to red will have no effect on the display of the label until the text is set once again. */ @interface TTTAttributedLabel : UILabel { @private