runOperationModalForWindow:delegate:didRunSelector:contextInfo:
ウインドウを表示して印刷操作を実行します
-(void)runOperationModalForWindow:(NSWindow *)docWindow: delegate:(id)delegate: didRunSelector:(SEL)didRunSelector: contextInfo:(void *)contextInfo:
解説
ウインドウを表示して印刷操作を実行します。
返り値
( void )
なし
引数
( NSWindow * )docWindow
文書ウインドウ
( id )delegate
デリゲート
( SEL )didRunSelector
( void * )contextInfo
追加情報
フレームワーク
ApplicationKit
クラス
NSPrintOperation
Instance Methods
使用可能
10.0
参照
例文
#import "Controller.h" @implementation Controller - (IBAction)pushButton:(id)sender { NSPrintOperation *op = [NSPrintOperation printOperationWithView:[[sender window] contentView]]; NSPrintInfo *pInfo = [NSPrintInfo sharedPrintInfo] ; [op setPrintInfo:pInfo]; [op runOperationModalForWindow:[sender window] delegate:self didRunSelector:@selector(endRun) contextInfo:nil]; } -(void)endRun { NSLog(@"end"); } @end