HomeiOS Developmentios - Animation typing textual content, swift

ios – Animation typing textual content, swift


I am attempting to make an animation of writing textual content, I used to be suggested this code

extension UILabel {
    func animation(typing worth: String, length: Double){
        for char in worth {
            self.textual content?.append(char)
            RunLoop.present.run(till: Date() + length)
        }
    }
}
override func viewDidAppear(_ animated: Bool) {
        tremendous.viewDidAppear(animated)
        animationMainLabel.textual content = ""
        animationMainLabel.animation(typing: "[BE YOUR OWN GODDESS nWITH STEYA COSMETICS.]", length: 0.1)
    }

It really works properly on the iPhone simulator however on an actual iPhone the animation doesn’t work. On an actual iPhone, the textual content is solely displayed and that’s it. what is the matter?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments