Decent palce.
This commit is contained in:
parent
6f4db10d33
commit
b9e80398c1
@ -514,7 +514,7 @@ public typealias ActionBlock = () -> ()
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
static func boundingRect(forCharacterRange range: NSRange, in label: Label) -> CGRect {
|
public static func boundingRect(forCharacterRange range: NSRange, in label: Label) -> CGRect {
|
||||||
|
|
||||||
guard let attributedText = label.attributedText else { return CGRect() }
|
guard let attributedText = label.attributedText else { return CGRect() }
|
||||||
|
|
||||||
@ -531,7 +531,7 @@ public typealias ActionBlock = () -> ()
|
|||||||
layoutManager.addTextContainer(textContainer)
|
layoutManager.addTextContainer(textContainer)
|
||||||
textStorage.addLayoutManager(layoutManager)
|
textStorage.addLayoutManager(layoutManager)
|
||||||
|
|
||||||
textContainer.lineFragmentPadding = 0
|
textContainer.lineFragmentPadding = 0.0
|
||||||
textContainer.lineBreakMode = label.lineBreakMode
|
textContainer.lineBreakMode = label.lineBreakMode
|
||||||
textContainer.maximumNumberOfLines = label.numberOfLines
|
textContainer.maximumNumberOfLines = label.numberOfLines
|
||||||
textContainer.size = label.bounds.size
|
textContainer.size = label.bounds.size
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user