您一直在关注本教程http://codingandcoffee.wordpress.com/2011/10/12/iphone-tutorial-two-combining-uitabbarcontrollers-uitableviews-and-uinavigationcontrollers/并设法成功完成它,但是有人能够帮助我在详细视图之前添加另一个tableview,因此深入研究对象1 --->对象1a --->详细视图。
由于
修改 好的,我正在看的数据结构是这样的:
object1 --> object 1a--> detail 1a (all the detail view will just contain an image)
--> object 1b--> detail 1b
--> object 1c--> detail 1c
--> object 1d--> detail 1d
--> object 1e--> detail 1e
object2 --> object 2a--> detail 2a
--> object 2b--> detail 2b
--> object 2c--> detail 2c
--> object 2d--> detail 2d
--> object 2e--> detail 2e
等等...... 所以我可以使用本教程将对象1实现到细节1a中,但是我需要在中间实现tableview。 我希望这更清楚。
答案 0 :(得分:0)
那么,你想要一个 UINavigationController - > UINavigationController - > 详细信息视图,对吗?首先,你的第一个视图需要是一个UINavigationController,如下所示:
FirstView : UINavigationController
之后,你需要添加一个新文件: UITableViewController 的 UIViewController 子类,并将其命名为 SecondTableView (或者你想要的东西) )。因此,在UINavigationController中,您需要在.m文件的顶部添加:
impot“SecondTableView.h”
在:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
你需要把这个:
SecondTableView *viewC = [[SecondTableView alloc] initWithNibName:@"SecondTableView" bundle:nil];
[self.navigationController pushViewController:viewC animated:YES];
[viewC release];
希望这会对你有所帮助,对不好的英语感到抱歉,
阿尔贝托