gpt4 book ai didi

cocoa - 如何反转 [NSWindow Zoom] 方法调用?

转载 作者:行者123 更新时间:2023-12-03 16:55:58 25 4
gpt4 key购买 nike

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

最佳答案

根据the documentation for the zoom: method (注意 :),zoom: 的逆是 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 there is no saved user state because there has been no previous zoom, the size and location of the window do not change.

如果您在标准状态下启动窗口,将会发生这种情况;因为它从未处于任何其他状态,所以它无法恢复到任何状态。

关于cocoa - 如何反转 [NSWindow Zoom] 方法调用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3466832/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com