patternImage
パターンカラーの画像を返します
解説
パターンカラーの画像を返します。
返り値
( NSImage * )
パターンカラーの画像
引数
フレームワーク
ApplicationKit
クラス
NSColor
Instance Methods
使用可能
10.0
参照
例文
#import "Controller.h" @implementation Controller - (IBAction)myAction:(id)sender { NSImage *theImage = [[NSWorkspace sharedWorkspace] iconForFile:@"/Applications/Preview.app"]; NSColor *theColor = [NSColor colorWithPatternImage:theImage]; [name setStringValue:@"MMMMMMMMM"]; [name setTextColor:theColor]; [image setImage:[theColor patternImage]]; } @end