Closed sajidhussain closed 6 years ago
Hi @sajidhussain, the easiest way to detect when the scroll animation is finished is to override the labelReturnedToHome
function in a custom subclass of MarqueeLabel. That will be called whenever the label animation returns to the "home" position where the animation starts, and you can use that to trigger your other events.
Hope this helps!
It is not very ideal to subclass MarqueeLabel just for that, MarqueeLabel is already a UILabel subclass. The nice way would be a protocol...
Well that's the beauty of subclassing, it doesn't really matter how many layers down you are, and enables you to add features not in the basic set.
But I understand your point - I've never needed that functionality myself, so I haven't spent the time to implement and test it. I'd be happy to support a pull request though! It should be easy to add a delegate pattern.
HI, Is there any way to detect string is finish in UIlabel to scroll. I am going to implement Marquee in my app but i have some different scenario to implement. I am getting information from web service it has string to play in Marquee. So please let me know how to show or detect scroll has finish or please suggest me how can i achieve this.
Please follow the general troubleshooting steps first:
Usage Details
Expected Behavior
Actual Behavior
Steps to Reproduce the Problem
1. 1. 1.