开发者

Cocoa - Override Lion Window Size Persistency

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜