I have a NSMutableArray and a grouped tableview that I populate from NSMutableArray.
When I print NSmutableArray with NSLog Output is
"String1","String2","String3"
But on UITableView Cell I always see the first item of NSMUtableArray:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return the number of sections.
return [_presenterList count];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
return 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
NSLog(@"_presenterList objectAtIndex: %@",[_presenterList objectAtIndex:indexPath.row]);
cell.textLabel.text=[_presenterList objectAtIndex:indexPath.row];
return cell;
}
output NSlog "String1"
Output on tableview
String1
String1
String1
What am I doing wrong?
EDIT SCREEN SHOT ADDED
I create some headers from Strings and 1 tableview row like in the picture
