
How is it possible to navigate from UITableView. I wanted to open another view on clicking Table cell view?

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if ([[self.navigationController viewControllers] count] < 3) {
RootViewController *mdetailViewController = [[RootViewController alloc] initWithStyle:UITableViewStylePlain];
mdetailViewController.rootArray = [self.rootArray objectAtIndex:indexPath.row];
[self.navigationController pushViewController:mdetailViewController animated:YES];
[mdetailViewController release];
}
[self.tableView deselectRowAtIndexPath:indexPath animated:YES];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [rootArray count];
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.