Currently I have a UITableView
that has a UIWebView
in every cell
. Each UIWebView
is loading a unique embedded YouTube video. Is there a way to keep the UIWebView
from reloading when scrolling. It looks cheaply developed when it scrolls on screen and is a white rectangle to loading a video thumbnail. I was looking into UIWebView
caching but I don't know how I would go about caching the WebView
to reuse it later.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can try this differently, just define new table view cell for that particular index like
UITableViewCell *cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:nil] retain];
see if that makes a difference you desire
回答2:
Keep a reference to the UITableViewCell
somewhere (an array in your UITableViewController
, for example), and return the existing cell
in the cellForRowAtIndexPath
call, instead of de-queueing
a new cell
.