You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
calling the shutdownLabel or pauseLabel should stop the animation
Actual Behavior
Even after calling those functions, the scrolling continues
Steps to Reproduce the Problem
I'm using a custom class to detect when the animation reaches the home position.
classCustomMarqueeLabel:MarqueeLabel{openvarreturned:((Bool)->Void)?overridefunc labelReturnedToHome(_ finished:Bool){
super.labelReturnedToHome(finished)
if returned !=nil{
returned!(finished)}}}
Sorry for the slow reply - I'm not sure exactly what's causing your problem, but I have a few ideas. Either my recent changes to the animation handling has broken shutdownLabel, or something else is causing the scroll animation to trigger. Also possible the closure you're using could make something weird happen, although I can't say for sure (I'll have to try it).
In the interim, perhaps instead you could try setting the holdScrolling property to true from the start? (Like in your main code block) That will prevent automatic scrolling and subsequent loops, but then you can call triggerScrollStart at the appropriate time and the label will complete only one loop.
Sorry it took so long, but I figured this one out and it's fixed in release 3.1.6. The issue was that calling shutdownLabel() removes the any in-flight animations, which is detected in the scroll completion block and breaks the repeating loop of adding another animation. But your method calls shutdownLabelin between animations, so there was no incomplete animation to detect and the loop just happily continued.
I fixed the issue by checking if the scrollCompletionBlock has been set to nil, and if so aborting the next loop.
Usage Details
Expected Behavior
calling the shutdownLabel or pauseLabel should stop the animation
Actual Behavior
Even after calling those functions, the scrolling continues
Steps to Reproduce the Problem
I'm using a custom class to detect when the animation reaches the home position.
Then in the main code.
What am i doing wrong ?
The text was updated successfully, but these errors were encountered: