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

Added preloading items, defaults to 0 #102

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

coneybeare
Copy link

#34

I added some preloading items to assist with views that grab content from the web. This prevents flickering for the most part, as long as the user swipes at a normal pace. It defaults to 0 items preloaded, other than any of the existing preloaded views from the visibleInidices

@vassily-fr
Copy link

You should also not unload view that are in preloading arrays :
//remove offscreen views
for (NSNumber *number in [_itemViews allKeys])
{
if (![visibleIndices containsObject:number] && ![preloadedIndices containsObject:number])
{
DLog(@"unloading view at index %@",number);
UIView *view = _itemViews[number];
[self queueItemView:view];
[view removeFromSuperview];
[_itemViews removeObjectForKey:number];
}
}

@fernandomatal
Copy link

Any updates about this? Sounds like a good idea.

Copy link

@lewis-smith lewis-smith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been using this for a long time and it works fine and improves response time.

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.

6 participants