Hi,
I have a TableView what loads it's cells from XIB's:
The two cells are different height. I set up the list's rowHeight in the viewDidLoad. The list contains only one kind of cells: either short ones, or tall ones, they are not mixed. If I set up the list from the taller, than the shorter, the cells are not redrawn correctly: some garbage will stay from the taller cell (the red, green, purple text).
How can I force the list to redraw itself completly?
What did I made wrong?
I have a TableView what loads it's cells from XIB's:
Code:
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *MyIdentifier = @"MyIdentifier2";
GeoLoc *aGeoLoc = [appDelegate.ClosestArray objectAtIndex:indexPath.row];
if (haveStat) {
GeoLocCellWithSlots *aCell = (GeoLocCellWithSlots *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (aCell == nil){
[[NSBundle mainBundle] loadNibNamed:@"GeoLocCellWithSlots" owner:self options:nil];
aCell = geoCellWithSlots;
self.geoCellWithSlots = nil;
}
[aCell setGeoLoc:aGeoLoc];
return aCell;
}
else {
GeoLocCell *aCell = (GeoLocCell *)[tableView dequeueReusableCellWithIdentifier:MyIdentifier];
if (aCell == nil){
[[NSBundle mainBundle] loadNibNamed:@"GeoLocCell" owner:self options:nil];
aCell = geoCell;
self.geoCell = nil;
}
[aCell setGeoLoc:aGeoLoc];
return aCell;
}
}
The two cells are different height. I set up the list's rowHeight in the viewDidLoad. The list contains only one kind of cells: either short ones, or tall ones, they are not mixed. If I set up the list from the taller, than the shorter, the cells are not redrawn correctly: some garbage will stay from the taller cell (the red, green, purple text).
How can I force the list to redraw itself completly?
What did I made wrong?