代码拉取完成,页面将自动刷新
YFRollingLabel is a rolling Label using NSTimer.
博客园记录: 【IOS】自定义可点击的多文本跑马灯YFRollingLabel
if only one text need to be shown it will roll in a fixed direction automatic.
![LongText](LongText.gif)if more than one text need to be shown it will roll circularly.
![TextArray](TextArray.gif)if the width of the only one text is smaller than view's width it won't roll.
Please notice that Only Two Labels are used in this "YFRollingLabel".
so if you set the "InternalWidth" and text a short width, it will break into showing the next label suddenly instead of smothly;YFRollingLabel *label = [[YFRollingLabel alloc] initWithFrame:frame textArray:@[@The first One”,@“The Second One”,@“The Third One”,@“The Last One”] font:[UIFont systemFontOfSize:20] textColor:[UIColor whiteColor]];
speed: pixel rolling for every 0.02s, default : 1.0f.
internalWidth: the width between two labels, default : a third of view's width.
orientation: rolling from left to right or not: default : RollingOrientationLeft.
-(void)beginTimer; start rolling.
-(void)pauseTimer; pause rolling.
-(void)stopTimer; stop rolling.
label.labelClickBlock = ^(NSInteger index){
//Your Code.
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。