GranibleLabel 1.0.2

GranibleLabel 1.0.2

dokgi88 维护。




  • dokgi88

titleGraniblelabelFullColor

Designed by yoon


GranibleLabel

Swift Platform License

顶部 左侧 右侧 底部
top.gif left.gif right.gif bottom.gif
左上对角线 左下对角线 右上对角线 右下对角线
leftTopDiagonal.gif leftBottomDiagonal.gif rightTopDiagonal.gif rightBottomDiagonal.gif

安装

pod 'GranibleLabel'

示例

最多可设置 4 种颜色。 无限模式最多可用三种颜色。

  • 设置无动画的普通渐变
/* 
* .bottom, .leftTopDiagonal, etc...
*/ 
let label = GranibleLabel()
label.colors = [UIColor.red, UIColor.orange]
  • 设置动画方向
/* 
* direction = .bottom, .leftTopDiagonal, etc...
* animate default = false
*/
label.direction = .top
label.animate = true
  • 设置无限模式
label.direction = .top
label.animate = true
label.infinity = true
  • 设置反向模式
/* 
* autoreverses default = false
*/
label.direction = .top
label.animate = true
label.reverse = true
  • 以及其他设置
/*
* You can use it just like a normal UILabel.
*/
label.text = "label"
label.textAlignment = .center
label.font = .boldSystemFont(ofSize: 10)
label.numberOfLines = 2

许可证

GranibleLabel 在MIT许可证下可用。有关更多信息,请参阅LICENSE文件。