Reusing UITableViewCells
In tableView:cellForRowAtIndexPath:
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UITableViewCell"];
//only create a cell if a suitable one doesn't already exist if (!cell) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"UITableViewCell"]; }
This is faster, as it avoids creating a separate UITableViewCell for every object, even for ones which are not being shown.











