项目介绍:
LMJVerticalScrollText
github地址:https://github.com/JerryLMJ/LMJVerticalScrollText
如果此代码帮助到你,请赐给一颗star,你的鼓励是我coding的动力!
- 一个简单好用的字符串滚动控件
效果
- 无间隙从下到上循环滚动
- 有间隙从上到下循环滚动
支持哪些场景
- UIView、UITableViewCell、Storyboard 等…
属性及方法[td]
| 属性 | 描述 |
| delegate | 代理 |
| textDataArr | 文字数据,支持<NSString >和<NSAttributedString >类型 |
| textFont | 文字字体 |
| textColor | 文字颜色 |
| textAlignment | 文字对齐 |
| textStayTime | 文字停留时间,默认3s |
| scrollAnimationTime | 文字滚动动画时间,默认1s |
| touchEnable | 是否能够点击,默认YES |
[td]
| 方法 | 描述 |
| – startScrollBottomToTopWithSpace | 从下到上有间隙滚动 |
| – startScrollTopToBottomWithSpace | 从上到下有间隙滚动 |
| – startScrollBottomToTopWithNoSpace | 从下到上无间隙滚动 |
| – startScrollTopToBottomWithNoSpace | 从上到下无间隙滚动 |
| – stop | 停止滚动 |
| – stopToEmpty | 停止滚动,并清空显示 |
[td]
| 代理方法 | 是否必选 | 描述 |
| LMJVerticalScrollTextDelegate | — | — |
| – verticalScrollText:currentTextIndex: | 可选 | 当前显示 |
| – verticalScrollText:clickIndex:content: | 可选 | 点击当前显示内容 |
