Create a cell at the time no problem, right? Find Great God! ! !
code:
- (UITableViewCell *) tableView: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath
{
static NSString * CellIdentifier = @ "SimpleTableIdentifier";
UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier: CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: CellIdentifier] autorelease];
}
int row = [indexPath row];
NetContactersModel * model = [self.netContacters objectAtIndex: row];
cell.textLabel.text = model.userName;
return cell;
}
Reply:
Creates no problem. Tieshanglai code option you can take a look.
Reply:
Reusing the same cell problem,
In the - (UITableViewCell *) tableView: (UITableView *) tableView cellForRowAtIndexPath: (NSIndexPath *) indexPath
Inside judgment, the re-selected settings
Reply:
Has been solved, thanks to answer.
Reply:
Well, has been resolved, you said this is the reason ~
No comments:
Post a Comment