Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when GBInfiniteScrollView in a controller which is invisible. #42

Open
Shun87 opened this issue Apr 14, 2015 · 5 comments
Open

Bug when GBInfiniteScrollView in a controller which is invisible. #42

Shun87 opened this issue Apr 14, 2015 · 5 comments

Comments

@Shun87
Copy link

Shun87 commented Apr 14, 2015

I create a GBInfiniteScrollView instance on my viewController A, start AutoScroll, there is also a button on it, when I click it to push a new viewcontroller B, wait for a more than 3(default auto scroll duration is 3 seconds) seconds, click back button the show this viewcontrller A, contentView of GBInfiniteScrollView is blank, what's wrong?

@gblancogarcia
Copy link
Owner

Hi @Shun87,
Sorry for not answering before 😰. Could you explain more about this issue?
Cheers,

@paincompiler
Copy link

I've run into the same problem.

This happens when there's a GBInfiniteScrollView instance in a viewController A with autoScroll on.
So I use stopAutoScroll when the A view did disappear, but when I pop back to A, startAutoScroll just won't work unless I manually scroll the view once, auto scroll start to work again.

I doubt there're two bugs.
One is about the scroll view item displays blank. When I push to another viewController, the NSTimer you set still perform action to scroll. Sth must go wrong with it.

So I try to stopAutoScroll when I push to Another viewController.
But startAutoScroll go wrong when pop back.

I may track the problem and give you more detail if you still can not reproduce.
Thanks for your work!

@paincompiler
Copy link

Ok, once the instance is not in view and with autoScroll on, there comes the bug.
I wonder if sth be released unexpected.

@paincompiler
Copy link

I think I found out.
When the instance come back to visible, the - (void)prepareForReuse is called and the content of page is set to nil.... the moment it's blank...

@paincompiler
Copy link

Now my solution is stop the auto scroll when the scroll view is invisible, and start auto scroll when get back. @Shun87

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

No branches or pull requests

3 participants