macOS/iOS API解説

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

目次

setPaperName:

用紙名をセットします
-(void)setPaperName:(NSString *)name:

解説

用紙名をセットします。

返り値

( void )

なし

引数

( NSString * )name

用紙名

フレームワーク

ApplicationKit

クラス

NSPrintInfo

Instance Methods

使用可能

10.0

参照

- dictionary
- initWithDictionary:
- paperName

例文

#import "MyObject.h"

@implementation MyObject

- (IBAction)myAction:(id)sender
{
NSPrintInfo *pInfo = [NSPrintInfo sharedPrintInfo] ;
NSPageLayout *pageLayout = [NSPageLayout pageLayout];

[pInfo setPaperName:@"B5(JIS)"];

[pageLayout beginSheetWithPrintInfo:pInfo
            modalForWindow:[sender window] 
            delegate:self 
            didEndSelector:@selector(didEndPageLayout) 
            contextInfo:nil ];
            
            NSLog([NSString stringWithFormat:@"%@",[pInfo paperName]]);
}
-(void)didEndPageLayout
{
NSLog(@"close");
}

@end