My iOS app does not display long attributes. I have a table cell that contains this text. When the text is very long, the table view does not respond for a while, but the text does not appear when loading. All other cells are displayed in order. And textView works fine with small text strings.
Here is the code:
descriptionCell = [tableView dequeueReusableCellWithIdentifier:@"CellAdDetailDescription"]; descriptionCell.bodyTextView.delegate = self; NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:self.ad.body]; UIFont *cellFont; cellFont = [UIFont fontWithName:@"HelveticaNeue" size:16.0]; NSDictionary *attributesDictionary; NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; paragraphStyle.lineSpacing = 10; attributesDictionary = @{NSParagraphStyleAttributeName : paragraphStyle , NSFontAttributeName: cellFont}; [str addAttributes:attributesDictionary range:NSMakeRange(0, str.length)]; descriptionCell.bodyTextView.attributedText = str;
I inserted a long line here . I am debugging and str loading in thin form with the desired text.
What is wrong here? What is the maximum string length in a UITextView ?
EDIT: very strange, when you try to select in a text editor, the text is displayed in a magnifying glass. I posted a video here .
Is this a bug in a UITextView?
Here is a screenshot. Empty white below - textView. 
source share