Skip to content

A subclass of UIScrollView which behaves like a marquee label. Uses UILabel and UIScrollVIew internally.

License

Notifications You must be signed in to change notification settings

viewDidAppear/UIScrollLabel

Repository files navigation

UIScrollLabel - Marquee UILabel

A marquee UILabel implementation, which utilises UIScrollView and CADisplayLink to scroll long text within a single-line label.

Installation with CocoaPods

pod 'UIScrollLabel'

Usage

Simply set UIScrollLabel as the subclass of your UIScrollView object, set the text in code, and you're good to go!

import UIScrollLabel

// ...

let pid = UIScrollLabel(frame: CGRect(x: 0, y: 0, width: screenWidth, height: 60))
pid.font = UIFont.boldSystemFont(ofSize: 40)
pid.textColor = UIColor.red
pid.text = "The next station is KOKKAIGIDJIDOMAE. The doors on the left-hand side will open."

You can set the textColor and text right from Interface Builder, too! 🎉

GIFs

Ease In Ease Out

Ease In

Ease Out

Linear

License

UIScrollLabel is released under the MIT license.


Presented to you with love, by @topLayoutGuide.