setAlternateImage:
ハイライト画像をセットします
-(void)setAlternateImage:(NSImage *)newAltImage:
解説
ハイライト画像をセットします。newAltImageがnilなら画像を削除します。
返り値
( void )
なし
引数
( NSImage * )newAltImage
セットする画像
フレームワーク
ApplicationKit
クラス
NSBrowserCell
Instance Methods
使用可能
10.0
参照
- alternateImage
例文
#import "butAction.h" @implementation butAction - (IBAction)myAction:(id)sender { NSImage *img = [NSImage alloc]; NSImage *altimg = [NSImage imageNamed: @"NSApplicationIcon" ]; [[myOutlet selectedCell] setAlternateImage:altimg]; img = [[myOutlet selectedCell] alternateImage]; [image setImage:img]; NSLog([[myOutlet selectedCell] className]); NSLog(@"!!!"); } @end