i want to jump in my detailview through the rows of my tableview.
passing the data from the tableview to detailview works fine. passing the indexpath.row working fine, too.
in the detailview i can change the indexpath of the row and by returning to the tableview the changed row is selected right.
And my problem is that i cant view the data of new selected row in the detailview.
i hope you understand what i am trying to do :)
for example like in the mail app: i want to push the "next" button and get the associated data .
Next function:
- (IBAction)nextRow:(id) sender {
NSLog(@"nextBtn");
TableRotateViewController *parent = (TableRotateViewController *)self.parentViewController;
NSIndexPath *actualIndexPath = detailselectedRow;
NSIndexPath * newIndexPath = [NSIndexPath indexPathForRow:actualIndexPath.row+1 inSection:actualIndexPath.section];
if([parent.view.subviews objectAtIndex:0]) {
UIView * subview = (UIView *) [parent.view.subviews objectAtIndex:0];
UITableView *tView = (UITableView *) subview;
[tView selectRowAtIndexPath:newIndexPath animated:YES scrollPosition:UITableViewScrollPositionMiddle];
[tView.delegate tableView:tView didSelectRowAtIndexPath:newIndexPath];
}
}
Here is my sample application for better understanding what i have done jet: http://www.file-upload.net/download-3896312/TableRotate.zip.html