macOS/iOS API解説

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

目次

printPanel

印刷パネルを返します

解説

印刷パネルを返します。

返り値

( NSPrintPanel * )

印刷パネル

引数

フレームワーク

ApplicationKit

クラス

NSPrintOperation

Instance Methods

使用可能

10.0

参照

- accessoryView
- setAccessoryView:
- setPrintPanel:
- setShowPanels:
- showPanels

例文

#import "Controller.h"

@implementation Controller

- (IBAction)pushButton:(id)sender
{
pOp = [NSPrintOperation currentOperation];
[pOp setShowPanels:YES];


[[pOp printPanel] beginSheetWithPrintInfo:nil
                        modalForWindow:[sender window]
                        delegate:self
                        didEndSelector:@selector(endSel)
                        contextInfo:nil
                        ];

[pOp runOperationModalForWindow:[sender window] delegate:self didRunSelector:NULL contextInfo:NULL];

[pOp showPanels];

}
- (void)endSel
{
[pOp runOperation];
NSLog(@"!!!");
}
                        

@end