I am working on a requirement where I need to have a TableView with two columns which should not be independent of each other. So I am not looking for two TableViews which scroll independently instead single TableView with two columns which can scroll together. In each of the column I again need to fill up data and a screenshot.
So as far now I have modified the code in the cellForRowAtIndexPath:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
static NSString *secondCellIdentifier = @"Cell2";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
UITableViewCell *cell2 = [tableView dequeueReusableCellWithIdentifier:secondCellIdentifier];
if (cell2 == nil) {
cell2 = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:secondCellIdentifier] autorelease];
}
// Configure the cell...
cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
cell.textLabel.text = [tableList objectAtIndex:indexPath.row];
cell2.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
cell2.textLabel.text = [tableList2 objectAtIndex:indexPath.row];
UITableViewCell *twoColumnRowView = [[UITableViewCell alloc]init];
[twoColumnRowView addSubview:cell];
[twoColumnRowView addSubview:cell2];
return twoColumnRowView;
}
But unfortunately I am not getting a two columned table, instead I am getting a weird output which can been seen in the screenshot.

Can someone guide me in the right direction.
P.S. I have gone through previous posts in the same forum and on internet regarding the same topic but nothing with proper explanation or example. Would be good to get a helpful information.
Thanks
You will have to create a custom UITableViewCell that has the layout you are looking for. Then you can instantiate it in the
tableView:cellForRowAtIndexPath:method