Skip to content

Comments

fix case where animation does not start in certain cases#4

Open
DimaVartanian wants to merge 1 commit intodreamengine:masterfrom
DimaVartanian:master
Open

fix case where animation does not start in certain cases#4
DimaVartanian wants to merge 1 commit intodreamengine:masterfrom
DimaVartanian:master

Conversation

@DimaVartanian
Copy link
Contributor

No description provided.

@dreamengine
Copy link
Owner

What are the cases where the animation might not start?

@dreamengine
Copy link
Owner

@DimaVartanian What are the cases where the animation might not start?

@DimaVartanian
Copy link
Contributor Author

@dreamengine sorry about that I've been totally swamped. I need to investigate this a little more to find a case that is reproducible outside of my app.

@maniak-dobrii
Copy link

I've found out that when DEInfiniteTileMarqueeView is used inside UITableViewCell it could stop animating, if you call beginScrollAnimation every time you configure the cell it doesn't stop. So, I see three ways to fix this:

  1. Programmatically create DEInfiniteTileMarqueeView every time cell is used/reused (unconvenient)
  2. Expose beginScrollAnimation (for now it's in class extension) so we can add this call to fix this (ugly)
  3. Investigate why it happens and fix it (right one, but I don't have time now)

So, can anyone try solution 3?

@dreamengine
Copy link
Owner

@maniak-dobrii do the changes proposed by Dima fix the issue you mentioned?

As to the problem you are seeing, the animation might be stopped prematurely when the infinite view is removed from the UI rendering tree as a result of the table cell being recycled. (We have a conditional in line 184 that would prevent the animation from repeating if the previous animation did not finish.) If this is the case and Dima's solution does not work, we could add a –willMoveToSuperview: method to the infinite view that will call -beginScrollAnimation whenever we are moving from a nil self.superview to a non-nil superview.

We're a little swamped at the moment on some other projects and can't investigate this some more, but if Dima's solution fixes this issue then we'll merge it in. Otherwise, the willMoveToSuperview: solution might do the trick (if it does, feel free to put in a pull request :-)).

@DimaVartanian
Copy link
Contributor Author

@maniak-dobrii does my pull request fix your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants