YetiCharacterLabelExample icon indicating copy to clipboard operation
YetiCharacterLabelExample copied to clipboard

Setting initial text value doesn't work

Open michaelmarks opened this issue 10 years ago • 0 comments

If you change your demo to use FadingLabel, the initial text value does not work. Setting a subsequent value works. The initial text value invokes animateOut, but it doesn't invoke the completion handler if there are no oldCharacterTextLayers. FallingLabel has an early out case at the beginning of animateOut. Adding the same check to FadingLabel seems to suffice (MotionLabel probably wants it as well

    if oldCharacterTextLayers.count == 0 {
        if let completionFunction = completion {
            completionFunction(finished: true)
        }
    }

michaelmarks avatar Jan 26 '16 18:01 michaelmarks