好吧,这是根目录中 didselectrow 的代码
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
DetailnewViewController *detailViewController = [[DetailnewViewController alloc] initWithNibName:@"DetailnewViewController" bundle:nil];
Card *selectedItem = (Card *)[[self fetchedResultsController] objectAtIndexPath:indexPath];
detailViewController.itcard = selectedItem;
detailViewController.managedObjectContext=self.managedObjectContext;
detailViewController.view.backgroundColor=[UIColor orangeColor];
[self.navigationController pushViewController:detailViewController animated:YES];
[detailViewController release];
[selectedItem release];
}
这是 Detailnewviewcontroller 的代码&你是对的我正在执行 viewdidload 中的请求
- (void)viewDidLoad
{
cardnumberlabel.text=itcard.CardNumber;
namelabel.text=itcard.Name;
phonelabel.text=itcard.phonenumber;
websitelabel.text=itcard.site;
}
感谢您的回复,我将尝试代表查看 c