CHIAnimatedLabel 0.0.1

CHIAnimatedLabel 0.0.1

Rihards Baumanis 维护。



  • Chili

CHIAnimatedLabel

安装

Cocoapods

pod 'CHIAnimatedLabel'

使用

非常直观 - 创建标签并设置所需效果。

let label = CHIAnimationLabel()
label.effect = .up

效果

public enum CHIAnimationEffect {
    case up
    case down
    case left
    case right
    case centerScale
    case custom(String)
}

效果非常直白 - 字符在预设方向中移动进出。centerScale 是一种字符被最小化出视图,随后通过相同的效果反序引入下一个字符的效果。

custom 效果旨在创建自己的效果 - 继承 CHIAnimatedLabel 并使用覆盖来实现

customAppearAttributes(for id: String, char: Character, index: Int, progress: Float)
customDisappearAttributes(for id: String, char: Character, index: Int, progress: Float)

以在帧上玩耍并调整自己的方法。

许可证

MIT许可证发布。