Hi I have this problem that if I add more than 13 items in my uitableview the items will repeat
this is my code for
Adding:
[categoryList insertObject:inputcategory atIndex:0];
NSIndexPath *indexpath = [NSIndexPath indexPathForRow:0 inSection:0];
[self.tableView insertRowsAtindexPaths@[indexpath] withRowAnimation:UITableViewRowAnimationAutomatic];
CellForRow:
if (cell == nil){
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
cell.textlabel.text = [categoryList objectAtIndex:indexPath.row];
}
NumberofRows
return [categoryList count];
the first 12 items are okay but after that it adds the same last object in my NSMutableArray again in my uitableview and when I reload it, It only records 12 items.