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

Orphaned list view items #6

Open
coryalder opened this issue Jun 20, 2011 · 6 comments
Open

Orphaned list view items #6

coryalder opened this issue Jun 20, 2011 · 6 comments

Comments

@coryalder
Copy link

my app has frequent listview reloads and I was getting ghost list view items that wouldn't go away no matter how many times I called [listView reloadData]

I ended up fixing this by removing the line [self.listView markViewBeingUsedForInertialScrolling:self]; from -(void)scrollWheel: in JAListViewItem. There doesn't seem to be any negative repercussions from doing this... at least nothing I've noticed yet.

If you want more details, let me know!

Otherwise it's a fantastic control, and I'm really digging it! I'll send you a promo code when my app ships. :)

Best,
Cory

@joshaber
Copy link
Owner

markViewBeingUsedForInertialScrolling is used to ensure that we don't remove views that are being use for inertial scrolling. Presumably inertial scrolling will be broken on your list now?

Are you using JAListView or some subclass? I've honestly never used JAListView itself, I usually use JAObjectListView, so it wouldn't be surprising if there were bugs.

@coryalder
Copy link
Author

Yeah, it breaks inertial scrolling, but it doesn't seem to break it in a destructive way... it just doesn't inertial scroll anymore. My list views have max 12 items in them, so inertial scrolling isn't really applicable anyway.

I'm using JAListView directly. I based my implementation on the demo code, so I didn't even notice JAObjectListView existed. I'll have a look at it, but right now I think just turning off inertial scrolling is going to work for me.

@joshaber
Copy link
Owner

Ahh ok. Thanks for letting me know. If you feel adventurous, I'd be happy to accept a pull request that fixes it ;)

@coryalder
Copy link
Author

I've found a better solution.
Adding [self clearViewsBeingUsedForInertialScrolling]; right at the beginning of reloadAllViews in JAListView seems to fix the issue, without killing inertial scrolling. I don't feel confident that I know the code well enough to say if there are any other side effects of this, but when I've field tested it for a bit I'll submit a pull request.

Thanks again!

@joshaber
Copy link
Owner

👍

@aufflick
Copy link
Contributor

Bump. @coryalder is this change production tested now?

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