我正在作为iOS开发人员开发我的第一个Cocoa应用程序。到目前为止,我在网上找到了我需要的大多数信息,但是我很难弄清楚如何显示一个新的自定义NSView / NSWindow(不确定哪个),如下所示:
向正确的方向推进绝对是值得欢迎的。
最佳答案
您可以在自定义视图和调用中使用NSPanel
NSPanel *panel=[[NSPanel alloc]initWithContentRect:NSMakeRect(0, 0, 800, 530) styleMask:NSClosableWindowMask backing:NSBackingStoreBuffered defer:YES];
panel.contentView=<# your custom view #>
[self.view.window beginSheet: panel completionHandler:^(NSModalResponse returnCode) {}];