Hi
I'm using ActiveLabel inside each cell of a collection view.
With the collection view delegate function, I have to give the size of each cell that will be used.
The cell height depends on the filled ActiveLabel text height.
Both this extension don't return the correct real label height, so the collection view cell will clip the text inside it.
The attributedText propriety of the ActiveLabel class don't represent the real layout of the label, resulting in a incorrect height calculation.
let text = "test"
let attributes = [ NSFontAttributeName: UIFont(name: "HelveticaNeue", size: 16.0)! ]
let attributedText = NSMutableAttributedString(string: text, attributes: attributes)
let textHeight: CGFloat = attributedText.heightForActiveLabel(withConstrainedWidth: width - 115.0)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi I'm using ActiveLabel inside each cell of a collection view. With the collection view delegate function, I have to give the size of each cell that will be used. The cell height depends on the filled ActiveLabel text height.
Both this extension don't return the correct real label height, so the collection view cell will clip the text inside it.
The attributedText propriety of the ActiveLabel class don't represent the real layout of the label, resulting in a incorrect height calculation.
extension NSAttributedString {
}
With a normal UILabel the calculated height is the same of the size that will be occupied.
Is this a bug? Or there is an apposite propriety to get the updated attributetText of an ActiveLabel instance?