Hi, I've tried looking it up here... but could see more questions like that one, but no answers.
I'm trying to add a new cell at the bottom of my table (add 1 more cell to the end) the cell should be different from the rest of the table cells, so I've created a new NIB with tableCell.
i've used this way to find the last cell in my table:
NSInteger sectionsAmount = [tableView numberOfSections];
NSInteger rowsAmount = [tableView numberOfRowsInSection:[indexPath section]];
if ([indexPath section] == sectionsAmount - 1 && [indexPath row] == rowsAmount - 1)
and inside, i would like to use my new tableCell, so I'm doing as follows:
static NSString *CustomCellIdentifier = @"InboxLoadMoreCell ";
InboxLoadMoreCell *cell = (InboxLoadMoreCell *)[tableView dequeueReusableCellWithIdentifier: CustomCellIdentifier];
if (cell == nil) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"IphoneLoadMoreCell" owner:self options:nil];
for (id oneObject in nib)
if ([oneObject isKindOfClass:[InboxLoadMoreCell class]])
cell = (InboxLoadMoreCell *)oneObject;
}
I have two issues now, 1. the new custom tableCell is not being loaded. 2. the row being updated is the last row but not a new row at the end (therefore, 1 needed row is being overridden)
Any Ideas how to proceed with this?