创建第二个窗口
您好,我想在第二个窗口中运行 OpenGlView。我可以打开这个“simualtion”窗口,但没有什么可看的,这是我在 Interface Builder 中创建的。我认为问题是我创建了一个全新的窗口。我尝试这种方式,因为我想关闭旧窗口并用一种相同的方法打开新窗口,因为我只想使用一个按钮。 所以我希望你能告诉我如何从 IB 链接窗口。 我尝试这种方式,因为我想关闭旧窗口并用一种相同的方法打开新窗口,因为我只想使用一个按钮。
simulation = window = [[NSWindow alloc] initWithContentRect:NSMakeRect(100,100,700,700)
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO];
[simulation makeKeyAndOrderFront:NSApp];
Hi I want to run an OpenGlView in a second window. I can open this window "simualtion", but there is nothing to see, which I created in the Interface Builder. I think the problem is that I created a completely new window. I try this way, because I want to close the old window and open the new one with one and same method, because I want to use only one button.
So I hope you can tell me how I can link the window from the IB.
I try this way, because I want to close the old window and open the new one with one and same method, because I want to use only one button.
simulation = window = [[NSWindow alloc] initWithContentRect:NSMakeRect(100,100,700,700)
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO];
[simulation makeKeyAndOrderFront:NSApp];
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嘿伙计们,我发现了问题所在:
在界面中:
在实现中:
Hey guys I found out what was the problem:
in the interface:
in the implementation: