lexrus / LTMorphingLabel

[EXPERIMENTAL] Graceful morphing effects for UILabel written in Swift.
MIT License
8.07k stars 782 forks source link

Index out of range Error when Text is empty before the new text will be added. #109

Open Skyb0rg opened 6 years ago

Skyb0rg commented 6 years ago

I got this Error: Thread 1: Fatal error: Index out of range Here:

func limboOfNewCharacter(
        _ char: Character,
        index: Int,
        progress: Float) -> LTCharacterLimbo {

            let currentRect = newRects[index] <---- here i got : Thread 1: Fatal error: Index out of range
            var currentFontSize = CGFloat(
                LTEasing.easeOutQuint(progress, 0, Float(font.pointSize))

the textlabel was empty (view did load) before i added new text later.