Scrolling stops after transition to another UIViewController and back again
Closed this issue · 2 comments
Hi,
I am seeing a problem where I have an AutoScrollLabel which scrolls fine. However, when I transition to another UIView and back to the view with the scrolling label the scrolling has stopped and will not re-start.
What seems to be happening is that when 'viewWillDisappear' is called in from main UIViewController containing the AutoScrollLabel, the processes scrolling the label are stopped by iOS but the '_scrolling' flag is not set to "NO". When I return to the UIViewController containing the AutoScrollLabel it will not start because the test in 'scrollLabelIfNeeded' at:
if (labelWidth <= CGRectGetWidth(self.bounds) || self.scrolling) {
return;
}
fails because 'self.scrolling' equals "YES" due to the completion block never being completed.
I have tried all sorts of things to get around this problem, including adding a setter to force 'scrolling' to "NO" (and changing from readonly)but nothing I have tried works.
Can you suggest a solution??
Thanks, Andrew
Makes sense. I removed the scrolling
condition.
I got this problem too. I have tabbar, when I change the tab, the scroll label stop and does not restart