Skip to content

Provides marquee like UILabel scrolling, think Music.app track title scrolling. For Obj-C & Swift.

License

Notifications You must be signed in to change notification settings

cbess/AutoScrollLabel

Repository files navigation

AutoScrollLabel

A UILabel with auto scrolling for text that may be clipped by the view. Provides edge fading, speed adjustment, scroll direction, etc.

screenshot screenshot2

CocoaPod: AutoScrollLabel

iOS 12, tvOS 12 and greater. For Non-ARC use v0.2.1.

#import <AutoScrollLabel/CBAutoScrollLabel.h>
import AutoScrollLabel
autoScrollLabel.text = @"This text may be clipped, but now it will be scrolled.";
autoScrollLabel.textColor = [UIColor systemBlueColor];
autoScrollLabel.labelSpacing = 35; // distance between start and end labels
autoScrollLabel.pauseInterval = 3.7; // seconds of pause before scrolling starts again
autoScrollLabel.scrollSpeed = 30; // pixels per second
autoScrollLabel.textAlignment = NSTextAlignmentCenter; // centers text when no auto-scrolling is applied
autoScrollLabel.fadeLength = 12.f; // length of the left and right edge fade, 0 to disable

Soli Deo gloria

Real world use:

app

Sola Tunes iOS App (Free)

License

MIT - Copyright (c) 2019 Christopher Bess

About

Provides marquee like UILabel scrolling, think Music.app track title scrolling. For Obj-C & Swift.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published