相关疑难解决方法(0)

如何将NSPanel显示为工作表

我正在尝试将NSPanel显示为工作表.我天真地做着这样的事情:

SheetController *sheetController = [[[SheetController alloc]
                                      initWithWindowNibName:@"Sheet"] autorelease];

[[NSApplication sharedApplication] beginSheet:sheetController.window 
                               modalForWindow:self.window
                                modalDelegate:self
                               didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) 
                                  contextInfo:nil];
Run Code Online (Sandbox Code Playgroud)

出于某些原因,我无法解决这个问题.当调用此部分代码时,工作表会暂时闪烁(因为autorelease消息).纸张永远不会挂在窗户上.

如果有人能指出我可以找到更多信息的地方,那将非常感激.

cocoa objective-c nswindow cocoa-sheet

7
推荐指数
1
解决办法
6571
查看次数

标签 统计

cocoa ×1

cocoa-sheet ×1

nswindow ×1

objective-c ×1