how to get selected index in tableview
<p>i am   usi9ng table view ,in the below method i want to set value of appdelegate.page equal to the value of table index.</p>

<p>if row one is selected than appdelgate.page = 1  if indexpath selectd =2, dan appdelegate.page =2...l;ike dat...so what should i replace index path in my code so that i will get the selected row index???</p>

<p>here my code</p>

<ul>
<li>(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
appDelegate = [[UIApplication sharedApplication] delegate];
appDelegate.page = indexPath;//////what should i put here instead of indexpath</li>
</ul>

<p>SecondViewController *svc = [[[SecondViewController alloc] init] autorelease];
svc.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; 
[self presentModalViewController:svc animated:YES];</p>

<p>}</p>
