Re: WindowController


Marco S Hyman
 

On Mon, Jul 17, 2017 at 11:27 am, Gerriet M. Denkmann wrote:



How did you hide the window (orderOut: or close)?
Clicking the red button.
Which probably does a close which is not what you want. Assuming that your window controller is your window delegate (I think that is set up automagically) you want to add a method to your controller. Something like this:

// window delegate function... orderOut instead of close

func windowShouldClose(sender: AnyObject!) -> Bool {
if let window = window {
window.orderOut(sender)
}
return false
}

Join {cocoa@apple-dev.groups.io to automatically receive all group messages.