Posted By

Netzach on 01/17/08


Tagged

textmate cocoa transparency ruby rubycocoa NSWindow Fade-out


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

Netzach
emoseman
webstic


Animate a fade-out of a NSWindow with RubyCocoa


 / Published in: Ruby
 

  1. # Animates the window fade-out in 0.5 second.
  2. def fadeOutWindow(windowOutlet)
  3. x = 0
  4. while x < 10
  5. windowOutlet.setAlphaValue(windowOutlet.alphaValue - 0.1)
  6. x += 1
  7. sleep(0.05)
  8. end
  9. end

Report this snippet  

You need to login to post a comment.