views:

16

answers:

1

Can I have different configuration of rows in different section of table view?

This method doesn't contains the section parameter:

-(UITableViewCell *)tableView:(UITableView *)tableView 
    cellForRowAtIndexPath:(NSIndexPath *)indexPath

So is it possible to do differently for different sections in the same table view?

+1  A: 

Yes you can have different configuration in different section of view.

Actually indexPath.row will give you row index and indexPath.section will give you section index.

-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
     NSLog(@"You are at row = %d and section = %d",indexPath.row,indexPath.section);
}

Depeneding on that two index you can specify different configurations.

Jim.

Jim