Hide and Show HUD window - Cocoa?

I have a HUD window with an inscription on it, and I want it to be shown when the user clicks a button. I know that it is simple, but I cannot get it to show again unless I restart my program.

Yours faithfully,

Kevin

+4
source share
2 answers

To hide hudWindow :

 - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { [hudWindow orderOut:nil]; // to hide it } 

Then press the button:

 - (IBAction)showWindow:(id)sender { [hudWindow makeKeyAndOrderFront:nil]; // to show it } 
+12
source

In IB, go to the window attribute inspector and make sure that "Issued at close" is unchecked.

+8
source

All Articles