может быть этот код поможет вам
в таблице Просмотр .m файла
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if(self.dvController == nil){
DetailsViewController *viewControoler = [[DetailsViewController alloc]initWithNibName:@"detailsViewController" bundle:[NSBundle mainBundle]];
self.dvController = viewControoler;
[viewControoler release];
}
DocumentNavController *docObjNew = [appdelegate.noteArray objectAtIndex:indexPath.row];
[docObjNew hydrateDetailViewData];
//
dvcontroller.noteObj = docObjNew; //noteobj reference from in DetailsViewController.m file DocumentNavController *noteObj;
dvcontroller.currentindex = indexPath.row;
[self.navigationController pushViewController:self.dvController animated:YES];
self.dvController.title = [docObjNew noteTitle];
[self.dvController.noteTitelFiled setText:[docObjNew noteTitle]];
[self.dvController.notediscView setText:[docObjNew noteDisc]];
}
в табличном представлении .h файл
@interface DocumentTableViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource> {
UITableView *documenttableView;
evernoteAppDelegate *appdelegate;
UINavigationController *navControll;
DetailsViewController *dvcontroller;
DocumentNavController *docNavContro;
//NSIndexPath *selectIndexPath;
}
@property (nonatomic, retain)DetailsViewController *dvController;
@property (nonatomic, retain)DocumentNavController *docNavContro;
@property (nonatomic, retain)UITableView *documenttableView;
в файле DetailsViewController.h
UITextField *noteTitelFiled;
UITextView *notediscView;
DocumentNavController *noteObj;
@property (nonatomic, retain)IBOutlet UITextField *noteTitelFiled;
@property (nonatomic, retain)IBOutlet UITextView *notediscView;
@property (nonatomic, retain)DocumentNavController *noteObj;