Posted By

Netzach on 02/16/09


Tagged

fade animation Objective-c


Versions (?)


Advertising

Website Promotion DIRECTORY is a crucial factor for all websites that need to gain better organic search engine rankings and increase website traffic.
Submitting your website as part of your Web Promotion strategy to our SEO friendly and high traffic Business Directory for review is an excellent way to gain a valuable backlink and increase your websites visibility online.

Submit Site


Who likes this?

6 people have marked this snippet as a favorite

Netzach
jamesming
mfazekas
Blaenk
emoseman
obsessivejosh


Animate A Fade-Out Of A NSWindow With Objective-C


Published in: Objective C 






Expand | Embed | Plain Text
  1. - (void)fadeOutWindow:(NSWindow*)window{
  2. float alpha = 1.0;
  3. [window setAlphaValue:alpha];
  4. [window makeKeyAndOrderFront:self];
  5. for (int x = 0; x < 10; x++) {
  6. alpha -= 0.1;
  7. [window setAlphaValue:alpha];
  8. [NSThread sleepForTimeInterval:0.020];
  9. }
  10. }

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: mfazekas on April 22, 2009

What is the purpose of makeKeyAndOrderFront, why we make it key window, before we fade it out?

You need to login to post a comment.

Download royalty free graphics