美文网首页
iOS FHScrollTextView的使用

iOS FHScrollTextView的使用

作者: 豆丶浆油条 | 来源:发表于2018-12-04 18:27 被阅读25次

       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"];
    

    GitHub

    相关文章

      网友评论

          本文标题:iOS FHScrollTextView的使用

          本文链接:https://www.haomeiwen.com/subject/zfjvcqtx.html