CRRollingLabel 提供了动画文本变化,作为一个滚动列。CRRollingLabel 是 UILabel 的子类,因此它支持所有 UILabel 的功能,无需任何额外配置,但仅限于显示数值。
将 CRRollingLabel
文件夹添加到您的项目中。CRRollingLabel 使用 ARC。如果您有一个不使用 ARC 的项目,只需将 -fobjc-arc
编译器标志添加到 CRRollingLabel 文件中。
CRRollingLabel 使用极其简单。CRRollingLabel 是 UILabel 的子类,因此您不需要任何额外的配置。
#import <CRRollingLabel/CRRollingLabel.h>
CRRollingLabel *rollingLabel = [[CRRollingLabel alloc] initWithFrame:CGRectMake(0.f, 0.f, 100.f, 100.f)];
[self.view addSubview:rollingLabel];
rollingLabel.text = @"43";
标签值更改默认为动画,但也可以设置没有动画的值。有关详细信息,请参阅 CRRollingLabel.h
文件。
CRRollingLabel 目前只支持一行文本。CRRollingLabel 目前仅限于与数值一起工作。非数值将被忽略。CRRollingLabel 目前无法正确处理包含不同字体和在单个 NSAttributedString
中放置的 attributedText。当前的 NSLineBreakMode
也没有正常工作。请使用 autoshrink 以达到预期结果。
要运行示例项目,首先克隆仓库,然后从 Example 目录运行 pod install
。
如果您有任何问题,请联系我们获取支持,邮箱:[email protected](邮件主题:“CRRollingLabel 支持。”)
或者
使用我们的联系方式
Cleveroad.com
Facebook 账户
Twitter 账户
Youtube 账户
Google+ 账户
LinkedIn 账户
Dribbble 账户
CRRollingLabel 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。