0
我有viewcontroller与表视图,当我点击一个单元格我去导航到另一个视图控制器与另一个tableview。uitableview的问题,当返回
我尝试在第一个viewcontroller中使用viewDidAppear和viewWillAppear,当我从第二个viewcontroller回到这个viewcontroller时,我会输入这个方法之一。
问题是当我返回到这个viewcontroller时他没有进入这个方法。
这是我如何进入第二视图控制器:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
ProfileViewController2 *tmp = [[ProfileViewController2 alloc]initWithType:indexPath.row string:[self.array2 objectAtIndex:indexPath.row]];
[[self navigationController] pushViewController:tmp animated:YES];
[tmp release];
[self.mytableview deselectRowAtIndexPath:indexPath animated:YES];
}
'viewWillAppear:'应该被调用。你想在'viewWillAppear:'中做什么,以及你是如何返回到第一个视图控制器的。 – 2011-06-15 00:59:06