1

我在 NSTreeviewController 课程中挣扎了 2 天。这是我的代码

    NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                            [NSNumber numberWithBool:YES], @"isGroup",
                            @"Desktop",@"name",
                            [NSMutableArray arrayWithObjects:
                             [NSDictionary dictionaryWithObjectsAndKeys:@"Science", @"name",nil],
                             [NSDictionary dictionaryWithObjectsAndKeys:@"Art", @"name", nil],
                             [NSDictionary dictionaryWithObjectsAndKeys:@"History", @"name", nil],nil], @"children", nil];

[treecontroller addObject:dic];

我已将 TreeController Keypaths 添加为“孩子”。

实际上我的应用程序范围是想显示文件目录。如下

我已附上图片NSTreeview

那就是我想在这里显示取景器。

我该如何添加到这里。请帮忙。我在等待。提前致谢。对不起我弄错了英语

4

0 回答 0