如何撤消[NSWindow zoom]方法调用? [英] How to reverse a [NSWindow zoom] method call?

查看:137
本文介绍了如何撤消[NSWindow zoom]方法调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许我对RTFM太盲目了,但是调用什么方法来反转缩放(最大化窗口)并使窗口返回到旧状态。

Maybe i'm just too blind to RTFM but what is the method to call to reverse the zoom (maximizing of a window) and bring the window back into the old state.

推荐答案

根据 zoom:方法的文档(请注意), zoom:的倒数就是 zoom:

According to the documentation for the zoom: method (note the :), the inverse of zoom: is zoom::


此操作方法在标准状态(由应用程序提供为最佳大小)之间切换窗口的大小和位置显示窗口的数据)及其用户状态(用户可以通过移动或调整窗口大小来设置新的大小和位置)。

This action method toggles the size and location of the window between its standard state (provided by the application as the "best" size to display the window’s data) and its user state (a new size and location the user may have set by moving or resizing the window).

如果处于用户状态(未缩放),它将更改为标准状态(缩放),如果是在标准状态(缩放)中,它将更改为用户状态(取消缩放)。

If it's in the user state (not zoomed), it'll change to the standard state (zoom), and if it's in the standard state (zoomed), it'll change to the user state (unzoom).

文档还指出:


如果由于没有以前的缩放而没有保存用户状态,则窗口的大小和位置不会更改。

If there is no saved user state because there has been no previous zoom, the size and location of the window do not change.

如果您以标准状态启动窗口,就会发生这种情况。由于它从未处于任何其他状态,因此没有任何内容可以还原。

This is what will happen if you started the window out in its standard state; since it was never in any other state, there is nothing for it to unzoom back to.

这篇关于如何撤消[NSWindow zoom]方法调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆