开发者

Redrawing the cocoa app's main window when clicked

开发者 https://www.devze.com 2023-02-14 12:41 出处:网络
I made an Mac OS X cocoa app, and when I click the red button the main window disappears. However, when I clicked the icon in dock, it doesn\'t show the main window anymore.

I made an Mac OS X cocoa app, and when I click the red button the main window disappears.

Redrawing the cocoa app's main window when clicked

However, when I clicked the icon in dock, it doesn't show the main window anymore.

Redrawing the cocoa app's main window when clicked

W开发者_开发技巧hat's wrong? How do i redraw the main window by catching what message?


You might be able to do something like this in your application delegate:

- (BOOL)applicationShouldOpenUntitledFile:(NSApplication *)sender {
    //show your window here
    return NO;
}
0

精彩评论

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