У меня есть пользовательский UITableViewCell, загруженный из файла пера. Все работает нормально, пока я не прокручиваюсь мимо последней ячейки, так что табличное представление должно приходить в норму, когда я отпускаю.
Затем ячейки в верхней части списка будут пустыми и останутся пустыми, пока я не обновлю представление таблицы вручную.
Изображение вопроса: [Снимок экрана iPhone] [1]
Вот моя ячейка для кода строки:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"TimeEntryCellIdentifier";
TimeEntryCell *cell = (TimeEntryCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"TimeEntryCell" owner:self options:nil];
for (id oneObject in nib) {
if ([oneObject isKindOfClass:[TimeEntryCell class]]) {
cell = (TimeEntryCell *) oneObject;
}
}
}
TimeEntry *aTimeEntry = [appDelegate.timeEntries objectAtIndex:indexPath.row];
cell.clientName.text = aTimeEntry.ClientName;
cell.category.text = aTimeEntry.CategoryName;
cell.hours.text = [NSString stringWithFormat:@"%@", aTimeEntry.Hours];
[TimeEntry release];
return cell;
}
Есть идеи?
[1]: http://dl.nvthost.com.s3.amazonaws.com/Screen снимок 2011-02-18 в 14:46.42 PM.png
[1]: http://dl.nvthost.com.s3.amazonaws.com/Screen снимок 2011-02-18 в 14:46.42 PM.png