Animate A Fade-Out Of A NSWindow With Objective-C
Copy this code and paste it in your HTML
- (void)fadeOutWindow
:(NSWindow*)window
{ float alpha = 1.0;
[window setAlphaValue:alpha];
[window makeKeyAndOrderFront:self];
for (int x = 0; x < 10; x++) {
alpha -= 0.1;
[window setAlphaValue:alpha];
}
}
Report this snippet
Comments
Subscribe to comments