views:

11

answers:

1

When I select a cell in section 0 of my tableview I always get taken to section 1 first ?

I think its somthing to do with my 'if' statments

code : http://pastie.org/868523

Thanks in advance.

+2  A: 

You don't reference the section anywhere in that code. You need to do something like

if(indexPath.section == 0) {
    //do section 0 loading
}
else if(indexPath.section == 1) {
    //do section 1 loading
}
//etc

Otherwise, if you click on the fourth row in any section, it looks like you will match the last if statement, which will be the last item pushed and therefore the one that you see.

David Kanarek
Thanks , that worked nicely :)
Dave