FlashingLabel
安装
pod 'FlashingLabel'
如何使用
- 必需
baseColor = UIColor.orange
flashingColors = [UIColor.orange.withAlphaComponent(0.5)]
flashingTime = 0.17
startFlashing()
- 初始化并开始闪烁
let label = FlashingLabel()
label.baseColor = UIColor.orange
label.flashingColors = [UIColor.orange.withAlphaComponent(0.5)]
label.flashingTime = 0.17
label.text = "HELLO"
label.startFlashing()
- 无限模式
label.flashingColors = [.orange, .purple]
label.isInfinite = true
- 停止闪烁
label.stopFlashing()
许可
FlashingLabel 可在 MIT 许可下使用。请参阅 LICENSE 文件获取更多信息。