我使用以下方法实现了我的工作表(NSPanel):
- (void)showInWindow:(NSWindow *)mainWindow {
if (!finestra1)
[NSBundle loadNibNamed:@"XibName" owner:self];
[NSApp beginSheet:finestra1 modalForWindow:mainWindow modalDelegate:nil didEndSelector:nil contextInfo:nil];
[NSApp runModalForWindow:finestra1]; //This call blocks the execution until [NSApp stopModal] is called}
工作表出现在我的屏幕中间,如何将其附加到我的主窗口顶部,并使其显示为“向下滑动”的效果?
提前谢谢。
发布于 2012-12-18 07:17:06
您是否尝试过简单地删除-runModalForWindow:行?
发布于 2012-12-18 02:21:01
The way I was taught,您演示的工作表应该是NSWindow,而不是NSPanel。
让我知道如果你想让我上传一个简单的演示项目。
https://stackoverflow.com/questions/13918907
复制相似问题