views:

419

answers:

2

Hello,

I am displaying some HTML in table cells, but when I scroll through the table, the contents of each cell re-renders as it appears on screen. The effect is blank cells as they scroll into view, and then the content appears after a lag. Here's the pertinent code:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"MainCell";
cell = ((MainCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]);
if (cell == nil) {
 [[NSBundle mainBundle] loadNibNamed:@"MainCell" owner:self options:nil];
}

UIWebView *status = [[UIWebView alloc] initWithFrame:tRect1];
[status loadHTMLString:curstatus baseURL:[NSURL URLWithString:@"file://"]];
[cell addSubview:status];

where "curstatus" is some html that I've marked up in the code. What can I do to make the UIWebView content stick around while scrolling?

Thanks!

John

A: 

I am also facing the same problem, kindly let me know if anyone has the answer.

Aashutosh
A: 

I am also facing the same problem, kindly let me know if anyone has the answer.

Aashutosh