?? FHScrollTextView是一個設置文字滾動的空間,使用非常方便,只能各種自定義。
FHScrollTextView.GIF
FHScrollTextView *scrollTextView = [[FHScrollTextView alloc] initWithFrame:CGRectMake(0, 100, self.view.frame.size.width, 30)];
[self.view addSubview:scrollTextView];
scrollTextView.backgroundColor = [UIColor yellowColor];
// 設置字體大小,默認16
scrollTextView.textFont = [UIFont systemFontOfSize:16];
// 設置字體顏色,默認blackColor
scrollTextView.textColor = [UIColor redColor];
// 設置文字左邊距,默認10
scrollTextView.labelLeftInset = 10;
// 設置自動滾動間隔時間,默認3s
scrollTextView.autoScrollTimeInterval = 2;
// 設置文字方向,默認左對齊
scrollTextView.textAlignment = NSTextAlignmentCenter;
scrollTextView.textArr = @[@"0000000000",@"1111111111",@"2222222222",@"3333333333",@"4444444444"];