I'd done following code, on which I get repeat result from 10 index. (indexPath.row)
my data is in Dictionary What could be the reason?
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSUInteger index = indexPath.row;
NSLog(@"Current cell index : %d",index);
static NSString *CellIdentifier = @"CellIndetifier";
BOOL isCellSelected = NO;
//ListViewCell *cell = (ListViewCell *)[table dequeueReusableCellWithIdentifier:CellIdentifier];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewStylePlain reuseIdentifier:CellIdentifier] autorelease];
NSString * text = nil;
if(isMultipleSelect){
text = [dicData objectForKey:[sortedData objectAtIndex:index]];
if([sIndexes containsObject:[sortedData objectAtIndex:index]]){
isCellSelected = YES;
}
}
cell.textLabel.text = text;
}
return cell;
}