Posted By

Netzach on 02/16/09


Tagged

fade animation Objective-c


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

Netzach
emoseman
shimdh
wpellis
gospaz


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


 / Published in: Objective C
 

  1. - (void)fadeInWindow:(NSWindow*)window{
  2. float alpha = 0.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  

You need to login to post a comment.