开发者

Cocoa - Override Lion Window Size Persistency

开发者 https://www.devze.com 2023-03-27 07:05 出处:网络
I have a Cocoa App that depends on the main window being a certain size when it opens. While running, however, I drop down a WebView and effectively change the frame size of the window. Next time I op

I have a Cocoa App that depends on the main window being a certain size when it opens. While running, however, I drop down a WebView and effectively change the frame size of the window. Next time I open a new window, its the size I left it with the expanded frame size.

I tried resetting the frame size in -windowWillClose and开发者_开发知识库 in applicationWillTerminate, but the former does nothing and the latter crashes the application upon closing.


Uncheck Restorable (or something like it [I'm not at my Mac right now]) for the window in interface builder. Then make sure the window is shown when your program starts.

0

精彩评论

暂无评论...
验证码 换一张
取 消