Redrawing the cocoa app's main window when clicked
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.
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;
}
精彩评论