The delegate method is called didSelectRowAtIndexPath. This is how you can use it:
Code:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
//First cell selected
if(indexPath.row==0){
StationDetailViewController *sdvc = [[StationDetailViewController alloc] initWithNibName:@"StationDetailViewController" bundle:nil];
[self.navigationController pushViewController:sdvc animated:TRUE];
[sdvc release];
}
//Second cell selected
else if (indexPath.row==1) {
AnotherViewController *avc = .....;
//and so on, like in the one above.
}
}
You can find more detailed information on UITableViews
here. The link is from BrianSlick's signature. He has some very good articles.