diff --git a/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift b/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift index 8a8ca5fb..14d2e247 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift @@ -41,6 +41,12 @@ public typealias ActionBlock = () -> () return NSRange(location: 0, length: text?.count ?? 0) } + open override var text: String? { + didSet { + // TODO....???? + } + } + //------------------------------------------------------ // MARK: - Multi-Action Text //------------------------------------------------------ @@ -892,7 +898,7 @@ extension Label { if clauses.isEmpty { // Replace the last whitespace with \u{00A0} No-break space. if let start = text?.lastIndex(of: " "), let end = text?.index(after: start) { -// text?.replaceSubrange(start.. CGSize { + guard let molecule = molecule as? HeadlineBody else { return super.frame.size } + let cell = self + cell.frame = CGRect(x: 0, y: 0, width: targetSize.width, height: CGFloat(MAXFLOAT)) + cell.layoutIfNeeded() + + return CGSize(width: molecule.bounds.width + cell.contentView.directionalLayoutMargins.leading + cell.contentView.directionalLayoutMargins.trailing, height: molecule.bounds.height + cell.contentView.directionalLayoutMargins.top + cell.contentView.directionalLayoutMargins.bottom) + } }