A subclass of UILabel reminiscent of Strong Bad's faithful Tandy 400 and MS-DOS of yore.
You can simply add the DossyText.swift
file to your project
You can use CocoaPods to install DossyText
by adding it to your Podfile
:
pod 'DossyText'
Simply create an instance of DossyTextLabel and add it to your view hierarchy however you would like:
let dossyLabel = DossyTextLabel()
Modify it as you would any UILabel:
dossyLabel.textColor = UIColor.cyan
dossyLabel.numberOfLines = 0
dossyLabel.lineBreakMode = .byWordWrapping
...and type away! ⌨️:
dossyLabel.type("Hello world!\nHow are you today?")
Adjust the speed of the typing by changing millisecondsPerLetter
. 70 is a pretty good place to start 🏃🏼.
blinksWhileIdle
-- When the typing ends the blinking animation will (or will not) automatically start.
Joey Nelson – @jedmondn – joeyedmondnelson@gmail.com
Distributed under the MIT license. See LICENSE
for more information.