latest and greatest
This commit is contained in:
parent
efba14f750
commit
b36299b695
@ -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..<end, with: "\u{00A0}")
|
||||
text?.replaceSubrange(start..<end, with: "\u{00A0}")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,4 +42,14 @@ import UIKit
|
||||
else { return 80 }
|
||||
return height
|
||||
}
|
||||
|
||||
// TODO: Figure out height.....
|
||||
open override func systemLayoutSizeFitting(_ targetSize: CGSize, withHorizontalFittingPriority horizontalFittingPriority: UILayoutPriority, verticalFittingPriority: UILayoutPriority) -> 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)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user