iPhone Web服务和表视图



我有一个通过xml解析器从web服务获取数据的表视图。我可以在第一个视图上获得数据,现在我的问题是,当我选择一行时,它应该带我到第二个有一个表,我应该选择一行到第三个详细信息视图,我似乎无法获得第二个视图来加载基于第一个视图选择的数据!现在我应该得到一个不同的url为每个视图与一些数据,如果是这样的话,我怎么能根据以前的视图的选择加载数据?

您需要使用UINavigationController

MySub1ViewController *mySub1ViewController = [[MySub1ViewController alloc] init];
//Push it to the top of the navigation controllers stack
[[self navigationController] pushViewController:mySub1ViewController animated:YES];
//Pop viewController from the view stack
[[self navigationController] popViewControllerAnimated:(BOOL)YES];

where MySub1ViewController viewcontroller应该实例化第二个tableView。现在需要将数据从currentViewController传递到MySub1ViewController

更多信息请查看本教程

最新更新