printerWithName:
名前で実際のプリンターを表すNSPrinterを返します
+(NSPrinter *)printerWithName:(NSString *)name:
解説
名前で実際のプリンターを表すNSPrinterを返します。
指定したプリンタが利用できなければnilを返します。
返り値
( NSPrinter * )
プリンタ
引数
( NSString * )name
名前
フレームワーク
ApplicationKit
クラス
NSPrinter
Class Methods
使用可能
10.0
参照
+ printerWithType:
+ printerNames
- name
例文
#import "Controller.h" @implementation Controller - (IBAction)pushButton:(id)sender { NSPrinter *prn = [NSPrinter printerWithName:@"MICROLINE 3050c"]; if ([prn acceptsBinary]){ NSLog(@"YES"); NSLog([prn name]); }else{ NSLog(@"NO"); } } @end