DHExpandableLabel
具有 "更多"/"更少" 功能的 UILabel 子类。
用法
let label = DHExpandableLabel()
label.numberOfLines = 2
let loremText = "Lorem ipsum dolor ..."
let attributed: [NSAttributedStringKey: Any] = [.font: label.font, .paragraphStyle: style]
label.shouldCollapse = true
label.originAttributedText = NSAttributedString(string: loremText, attributes: attributed)
## Installation
Available in [Cocoa Pods](https://github.com/CocoaPods/CocoaPods):
` pod 'DHExpandableLabel' `
## License
DHExpandableLabel is available under the [MIT license](https://open-source.org.cn/licenses/mit-license.php).