Iphone UITableView导航
我正在开发一个应用程序,其中我有一个选项卡栏,在第二个选项卡项中,我有一个Iphone UITableView导航,iphone,objective-c,Iphone,Objective C,我正在开发一个应用程序,其中我有一个选项卡栏,在第二个选项卡项中,我有一个UITableView,当用户按下UITableView上的行时,它必须导航到另一个UITableView(第二),一旦在第二个UITableView上,我们就可以导航到detailview。 有人能帮我解决这个问题吗。 非常感谢你的帮助 - (void)viewDidLoad { UITabBarController * t = [[UITabBarController alloc] init]; Res
UITableView
,当用户按下UITableView
上的行时,它必须导航到另一个UITableView
(第二),一旦在第二个UITableView
上,我们就可以导航到detailview。
有人能帮我解决这个问题吗。
非常感谢你的帮助
- (void)viewDidLoad {
UITabBarController * t = [[UITabBarController alloc] init];
ResourcesViewController * c = [[ResourcesViewController alloc] init];
UINavigationController * n = [[UINavigationController alloc] initWithRootViewController:c];
[c release];
NSArray * tabs = [NSArray arrayWithObject:n];
[n release];
[t setViewControllers:tabs];
[window addSubview:[n view]];
//---initialize the array---
listOfResources = [[NSMutableArray alloc] init];
//---add items---
[listOfResources addObject:@"Speeches"];
[listOfResources addObject:@"Publications"];
[listOfResources addObject:@"Images/Photo Library"];
[super viewDidLoad];
}
这是
rootviewController
中的ViewDidLoad
方法,我创建了名为detailtableviewcontroller
的下一级UITableView
,但无法从该方法调用它。这里有类似的问题:
我认为您可能需要以下视图层次结构(以及相应的控制器)来处理此问题:
UITabBarController
UINavigationController
UITableViewController
UITableViewController
DetailViewController
AnotherViewControllerForTabBarButton
您的UIDABBARController在视图之间切换(位于其下方一个缩进级别),其中一个视图将是UINavigationController,它将在您描述的各种表格视图(1和2)之间提供导航,并且在您钻取足够深的深度后提供详细视图
希望有帮助!:) 发布迄今为止您拥有的任何代码?