I present a NSPanel in a NSWindowController. When I press the little red button of the titlebar of the NSPanel I would like to change the way it disappears with a different animation. How do I do that? Is there something like -(void)closeButtonPressed that I can change. Because the -(void)close of the NSWindow is not working like I want it. When I present it I do it like this:
[self.imagePanelController.previewPanel setFrame:NSRectFromCGRect(CGRectMake(self.window.frame.origin.x + self.window.frame.size.width/4 , self.window.frame.origin.y + self.bounds.size.height/4, self.ciImage.extent.size.width, self.ciImage.extent.size.height)) display:YES animate:YES];
I would like to set a new frame again and animate that, when pressing the panel close button. Any ideas?