首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >DrillDown在UitableView中使用SplitView

DrillDown在UitableView中使用SplitView
EN

Stack Overflow用户
提问于 2011-03-02 06:32:17
回答 1查看 1.3K关注 0票数 0

我正在使用UITableView模板创建SplitView中的钻取,就像在邮件中一样。在一篇教程中,我创建了用于基于导航的模板的代码。

我试图将其修改为拆分视图模板。

代码语言:javascript
复制
    (void)tableView:(UITableView *)TableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
//Get the dictionary of the selected data source.
        NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row];
//Get the children of the present item.
        NSArray *Children = [dictionary objectForKey:@"Children"];
        if([Children count] == 0) {
        detailViewController.detailItem = [dictionary objectForKey:@"Title"];
        }
        else {

                  //Prepare to tableview.
                  RootViewController *rvController = [[RootViewController alloc]initWithNibName:@"RootViewController" bundle:[NSBundle mainBundle]
                  //Increment the Current View
                  rvController.CurrentLevel += 1;
                  //Set the title;
                  rvController.CurrentTitle = [dictionary objectForKey:@"Title"];
                  //Push the new table view on the stack
                 [COLOR="Red"][B] [self.navigationController pushViewController:rvController animated:YES];[/B][/COLOR]
        rvController.tableDataSource = Children;
                  [rvController release];
        }
}

我要怎么修改代码?红色线正在破坏密码。如何更改我的代码

我已经解决了我的查询,我正在附加示例应用程序,如果有人想达到同样的目的,那么我的解决方案将指向他们的某个路径,这里是

iPhone应用程序:http://www.mediafire.com/?nszdqqdht9ceakb

iPad SplitView应用程序:http://www.mediafire.com/?861jggve88o8tp8

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-03-02 13:44:28

你试过换衣服吗?

代码语言:javascript
复制
[self.navigationController pushViewController:rvController animated:YES]; 

代码语言:javascript
复制
[self.navigationController pushViewController:rvController animated:YES];
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5164180

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档