i need help. When my tableView\'s cell is selected, i want the cell to go to a page of its own, i don\'t want every cell to go to the same page. I tried using :
First off, albertamg's answer points out an important concept; the presentModalViewController
should be called on self
.
Second, it sounds like you need to have something unique happen in each subsequent view that you present, presumably based on data that creates your table cell. One way to do this is to set a @property
on your FirstFolderViewController
, just before you present it, and then when it's viewWillAppear
function, is called, you can act on that value.
For example,
FirstFolderViewController * first = [[FirstFolderViewController alloc]init];
first.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
first.folderNumber = indexPath.row; // Added
[self presentModalViewController:first animated:YES];
[first release];
...assuming you're calling this inside your - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
method, and you've set up a property called folderNumber
inside your FirstFolderViewController
.