UIScrollingLabel 1.0.0

UIScrollingLabel 1.0.0

sulioppa 维护。



  • 作者
  • 作者

UIScrollingLabel

自动滚动的标签。带有跑马灯效果的标签。

需求

iOS 9.0+

安装

pod 'UIScrollingLabel'
UIScrollingLabel *label = [[UIScrollingLabel alloc] initWithMaxContentWidth:120 contentHeight:26 contentInset:UIEdgeInsetsMake(10, 10, 10, 10) textSpace:10 isAlwaysScrollEnable:YES];
label.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
label.layer.cornerRadius = 12;
label.layer.masksToBounds = YES;
    
[self.view addSubview:label];
[label mas_makeConstraints:^(MASConstraintMaker *make) {
	make.center.equalTo(self.view);
}];
    
label.text = [[NSAttributedString alloc] initWithString:@"UIScrollingLabel" attributes:@{
	NSForegroundColorAttributeName: UIColor.whiteColor,
	NSFontAttributeName: [UIFont systemFontOfSize:22]
}];

作者

S.T.A.R. [email protected]

许可证

UIScrollingLabel 在 MIT 许可证下可用。

更多信息请参阅 LICENSE 文件。