Open snsdev1 opened 5 years ago
CGSize maxSize = CGSizeMake(width, MAXFLOAT); NSAttributedString attributedString = @"attributed string"; YYTextContainer textContainer = [YYTextContainer containerWithSize:maxSize]; YYTextLayout *layout = [YYTextLayout layoutWithContainer:textContainer text:attributedString]; NSInteger rowCount = layout.rowCount;
CGSize maxSize = CGSizeMake(width, MAXFLOAT); NSAttributedString attributedString = @"attributed string"; YYTextContainer textContainer = [YYTextContainer containerWithSize:maxSize]; YYTextLayout *layout = [YYTextLayout layoutWithContainer:textContainer text:attributedString]; NSInteger rowCount = layout.rowCount;