Really like this inspiration. There are still two ways in the application: 1) Here is the code I created for your instance:
import UIKit
class ViewController: UIViewController {
let listOfRandomLetters = ["@", "%", "*", "^", "1", "2", "3", " ", " "]
var textNeedDisplaying = ["String", "Other Person", "Sample", "String", "Other Person", "Sample", "String", "Other Person", "Sample", "String", "Other Person", "Sample", "String", "Other Person", "Sample", "String", "Other Person", "Sample", "String", "Other Person", "Sample"]
var newList: [String] = []
var incrementer = 0
var internalTimer: Timer?
var timer: Timer?
var mainTimer: Timer?
@IBOutlet weak var animatingLabel: UILabel!
override func viewDidAppear(_ animated: Bool) {
schedule()
}
func schedule() {
self.mainTimer = Timer.scheduledTimer(withTimeInterval: 1, repeats: true, block: { _ in
self.internalTimer = Timer.scheduledTimer(withTimeInterval: 0.1, repeats: true, block: { _ in
for _ in 0...arc4random_uniform(UInt32(10)) + 1 {
let randomNumber = arc4random_uniform(UInt32(self.listOfRandomLetters.count - 1))
self.newList.append(self.listOfRandomLetters[Int(randomNumber)])
}
self.animatingLabel.text = self.newList.joined()
self.newList.removeAll()
})
self.timer = Timer.scheduledTimer(withTimeInterval: 0.7, repeats: false, block: { _ in
if self.incrementer != self.textNeedDisplaying.count - 1 {
self.internalTimer?.invalidate()
self.animatingLabel.text = self.textNeedDisplaying[self.incrementer]
self.incrementer += 1
} else {
self.timer?.invalidate()
self.internalTimer?.invalidate()
self.mainTimer?.invalidate()
self.animatingLabel.text = "DONE"
}
})
})
}
}
, , . ... , , . , , .
2) Lottie after effects . , : : https://airbnb.design/lottie/.