initWithName:fromFile:
ファイルからカラーリストを作って初期化して返します
-(id)initWithName:(NSString *)name: fromFile:(NSString *)path:
解説
ファイルからカラーリストを作って初期化して返します。
返り値
( id )
カラーリスト
引数
( NSString * )name
名前
( NSString * )path
ファイルパス
フレームワーク
ApplicationKit
クラス
NSColorList
Instance Methods
使用可能
10.0
参照
例文
#import "scriptSend.h" @implementation scriptSend - (IBAction)myAction:(id)sender { NSColorList *cList = [[NSColorList alloc] initWithName:@"NewList"]; NSColorList *cList2; if ([cList writeToFile:[@"~/NewList.clr" stringByExpandingTildeInPath]]) { NSLog(@"YES"); cList2 = [[NSColorList alloc] initWithName:@"NewList2" fromFile:[@"~/NewList.clr" stringByExpandingTildeInPath]]; }else{ NSLog(@"NO"); } } @end