MacOSXプログラミング。毎日更新。 話題: Cocoa, Objective-C, Snow Leopard 前回検証した NSViewAnimation クラスを使って SimpleView にフェードイン/フェードアウト効果を導入する。 パネルウィンドウのクラス SimpleViewerPanel へ show/hideメソッドを用意してこれで制御することにしよう。 SimpleViewerPanel.h @interface SimpleViewerPanel : NSPanel { } - (void)show; - (void)hide; @end 以下、実装コード。 SimpleViewerPanel.m #define FADE_DURATION 0.25 - (void)show { if (![self isVisible]) { [self setAlphaValu
