以可编程方式打开和关闭窗口

编程入门 行业动态 更新时间:2024-10-25 10:34:10
本文介绍了以可编程方式打开和关闭窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的项目中有两个nib。我一直在挖网络,以弄清楚如何使一个按钮关闭或隐藏的笔尖,按钮是打开另一个。另一个笔尖会有一个按钮,做同样的事情,但反之亦然。

I have two nibs in my project. I have been digging around the interwebs to figure out how to make a button close or hide the nib that the button is on and open another one. The other nib would have a button that does the same thing but in vice versa.

我没有最初的想法从这里开始。如果有人只是做一个样例类和方法,我可能会有一些工作。

I don't have the faintest idea where to start with this. IF someone could just make a sample class and methods for this i might have something to work with.

推荐答案

[window close];

隐藏窗口(不释放)

[window orderOut:self];

将窗口移到其在屏幕列表中的级别(=显示窗口)

[window orderFront:self];

查看

  • NSWindow类别参考
  • 窗口编程指南
  • NSWindow Class Reference
  • Window Programming Guide

更多推荐

以可编程方式打开和关闭窗口

本文发布于:2023-06-04 08:32:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/493305.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:可编程   关闭窗口   方式

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!