У меня есть UITableView с верхней панелью навигации. Данные для UITableView поступают из массива, который содержит более 20 объектов.
Пока все хорошо. Однако иногда, когда я делаю повторную прокрутку (быструю), я нахожу, что последний ряд повторяется, иногда разрезается пополам, перезаписывается.
Я новичок в разработке для iPhone и понятия не имею, почему это происходит.
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
return [appDelegate.preList count];
}
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
// Configure the cell...
Item *i=[appDelegate.preList objectAtIndex:indexPath.row];
cell.textLabel.text=i.iName;
cell.accessoryType=UITableViewCellAccessoryNone;
return cell;
}
Я также приложил скриншот с моей проблемой. Обратите внимание на навигационную панель и последнюю ячейку.

Помощь будет принята с благодарностью