Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/42.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone UITableView导航_Iphone_Objective C - Fatal编程技术网

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)之间提供导航,并且在您钻取足够深的深度后提供详细视图


希望有帮助!:)

发布迄今为止您拥有的任何代码?