示例
要运行示例项目,请先克隆仓库,然后从 Example 目录运行 pod install
。
安装
AttriBeauty 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中:
pod 'AttriBeauty'
使用方法
@IBOutlet var demoLabel: UILabel!
demoLabel.attributedText = "Hello World!\n AttriBeauty is very awesome!"
.beautfiy()
.attriBeauty
.fgColor(.blue)
.bgColor(.purple).regex("y")
.fgColor(.red).range(NSRange(0...4))
.font(.boldSystemFont(ofSize: 30))
.align(.center)
.apply()
作者
O-O-wl, [email protected]
许可证
AttriBeauty 适用于 MIT 许可证。请参阅 LICENSE 文件获取更多信息。