imageDidNotDraw:inRect:
何かの理由で画像が読み込めなかったときに呼び出されます
-(NSImage *)imageDidNotDraw:(id)sender: inRect:(NSRect)aRect:
解説
何かの理由で画像が読み込めなかったときに呼び出されます。
デリゲートで実装します。
返り値
( NSImage * )
画像
引数
( id )sender
送信オブジェクト
( NSRect )aRect
範囲
フレームワーク
ApplicationKit
クラス
NSImage
Instance Methods
使用可能
10.0
参照
例文
#import "MyImage.h" @implementation MyImage - (NSImage *)imageDidNotDraw:(id)sender inRect:(NSRect)aRect { NSImage *img = [NSImage imageNamed: @"NSApplicationIcon" ];//読み込めなかったときの代替画像 NSLog(@"imageDidNotDraw"); return img; } @end