我正在尝试创建自定义保存面板,我可以使用accessoryView
NSSavePanel
属性添加我的字段和复选框,但我还想隐藏默认保存为标签字段和标签标签和字段中的字段有没有办法做到这一点?
来自json accelerator app的屏幕截图。是NSSavepanel
还是其他任何控件?
答案 0 :(得分:0)
最后意识到它不是NSSavePanel
NSOpenPanel
NSOpenPanel* openDlg = [NSOpenPanel openPanel];
[openDlg setCanChooseFiles:NO];
[openDlg setCanCreateDirectories:YES];
[openDlg setCanChooseDirectories:YES];
NSView *view = [[NSView alloc] initWithFrame:NSMakeRect(0, 0, 0, 100)];
openDlg.accessoryView = view;
[openDlg beginSheetModalForWindow:self.window completionHandler:^(NSInteger result) {
NSLog(@"%ld",(long)result);
}];