macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

runModalPrintOperation:delegate:didRunSelector:contextInfo:

印刷パネルを表示してモーダルを開始します
-(void)runModalPrintOperation:(NSPrintOperation *)printOperation:
                    delegate:(id)delegate:
                    didRunSelector:(SEL)didRunSelector:
                    contextInfo:(void *)contextInfo:

解説

印刷パネルを表示してモーダルを開始します。

返り値

( void )

なし

引数

( NSPrintOperation * )printOperation

印刷操作

( id )delegate

デリゲート

( SEL )didRunSelector

アクションセレクタ

( void * )contextInfo

追加情報

フレームワーク

ApplicationKit

クラス

NSDocument

Instance Methods

使用可能

10.0

参照

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
//docはNSDocument

[doc runModalPrintOperation:[NSPrintOperation printOperationWithView:sender printInfo:[NSPrintInfo sharedPrintInfo]]
                                delegate:self
                                didRunSelector:@selector(layoutAction:)
                                contextInfo:nil
                                ];

}
- (void)layoutAction:(id)sender
{

    NSLog(@"!!!");
}
@end