This is probably a simple question but I can't seem to figure out how to do it. Basically all I want to do is fade a window before closing it:
[[window animator] setAlphaValue:0.0];
[window close];
This works fine without the [window close], but when that is included the window seems to close it before the animation finishes (which is obviously not what I want); the same seems to happen for orderOut:, performClose:, etc. Is there any way to avoid this?
[[window animator] setAlphaValue:0.0];
[window performSelector:@selector(performClose:) withObject:self afterDelay:[[NSAnimationContext currentContext] duration]];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With