macOS/iOS API解説

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

目次

setAccessoryView:

アクセサリービューをセットします
-(void)setAccessoryView:(NSView *)aView:

解説

アクセサリービューをセットします。エラーは出ませんが機能しません(10.2)

返り値

( void )

なし

引数

( NSView * )aView

アクセサリービュー

フレームワーク

ApplicationKit

クラス

NSPrintOperation

Instance Methods

使用可能

10.0

参照

- accessoryView
- printPanel
- setPrintPanel:
- setShowPanels:
- showPanels

例文

#import "Controller.h"

@implementation Controller

- (IBAction)pushButton:(id)sender
{

NSPrintOperation *op = [NSPrintOperation printOperationWithView:[[sender window] contentView]];
NSPrintInfo *pInfo = [NSPrintInfo sharedPrintInfo] ;

[op setAccessoryView:addView];
NSLog([[op accessoryView] className]);
[op setPrintInfo:pInfo];

([op runOperation]) ? NSLog(@"YES") : NSLog(@"NO");
}

@end