This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let animationDelay = 0.5 // tweak this to speed up / slow down animation | |
var hiddenDots = 3 | |
func animateDots() { | |
if let str = label.text { | |
let range = NSRange(location: str.count - hiddenDots, length: hiddenDots) | |
let string = NSMutableAttributedString(string: str) | |
string.addAttribute(.foregroundColor, value: UIColor.clear, range: range) | |