• Aloha!



    Hello and welcome to this web page. My name is malcom and I'm a student of Computer Science in Rome.

    As you will found browsing these pages I'm a compulsive nerd programmer; my only cure and big hobby is making programs.. computers, mobile devices, web apps really don't care. This the reason because you could found this site very annonying; "normal" don't like these things.

    Ok don't worry, I've a solution; instead of reading boring tech articles you can take a look to my photo albums...
    Feel free to browse around, there are 2 other users currently online with you (and if I'm not wrong I've served 163 users today.)
  • Projects

    My main application platform is Mac OS X (and iPhone too). However you could found some web apps (mainly php) and some other things... something usefull, something marked as inutility.

    MAC APPLICATIONS
    • Nemo (USENet Reader)
    • LightMe (Switch on/off your LCD)
    • PDFMerge (Merge your pdf files)
    • ExifShopper (EXIF data manager)


    OPENSOURCE
    • OFAPI (phpBB XML-RPC)
    • OFAPI Framework (Cocoa and Java)
  • Picturegrid

Nov 26 2007

Fade in NSWindow

Posted by malcom.mac

Lavorando all’ultima versione di Nemo solo per Leopard (uno dei motivi per cui il blog soffre parecchio in quanto ad aggiornamenti), ho iniziato anche a giocare con qualche semplice effetto. Tra questi c’è il classico fade in/out delle finestre, ovvero l’effetto di dissolvenza che inizia già a vedersi in diverse altre applicazioni.

NSAnimation ha reso questo effetto ancora più semplice ciò che, almeno in questo caso, lo era di suo (un esempio del “vecchio” metodo implementato con Timer lo trovate a questo indirizzo).
Ho realizzato una semplice subclass di NSWindow con due metodi, -fadeIn e -fadeOut che può essere facilmente incorporata in qualsiasi altro progetto: il codice lo trovate qui.

Non aggiungo molto altro (è tardi son stanco) visto che i due metodi sono davvero molto semplici.
FadeNSWindow.zip

[tags]Fade NSWindow, NSAnimation fade[/tags]