JLEasyAttributedString 0.2.1

JLEasyAttributedString 0.2.1

liujinlongxa 维护。



  • liujinlongxa

EasyAttributedString

CI Status Version License Platform

示例

要运行示例项目,先克隆存储库,然后在示例目录中首先运行 pod install

如何使用

let text = """
We have not one, not two, but three exciting new books for you this season: Machine Learning by Tutorials, Push Notifications by Tutorials, and Advanced iOS App Architecture! We think you’ll really enjoy what we have planned for these books. Read on below to see what’s in store for you!
We have not one, not two, but three exciting new books for you this season: Machine Learning by Tutorials, Push Notifications by Tutorials, and Advanced iOS App Architecture! We think you’ll really enjoy what we have planned for these books. Read on below to see what’s in store for you!
"""
label.attributedText = text.eas
    .font(UIFont.systemFont(ofSize: 18))
    .foregroundColor(UIColor.red)
    .backgroundColor(UIColor.green)
    .ligature(0)
    .kern(2)
    .lineSpacing(5, range: NSRange(location: 0, length: 20))
    .paragraphSpacing(10)
    .alignment(.center)
    .headIndent(10, range: NSRange(location: 0, length: 10))
    .attributedString

要求

安装

EasyAttributedString 通过 CocoaPods 提供。要安装,只需将以下行添加到您的 Podfile 中

pod 'EasyAttributedString'

作者

liujinlongxa,[email protected]

许可协议

EasyAttributedString 采用 MIT 许可协议。有关更多信息,请参阅 LICENSE 文件。