paperSize
紙のサイズを返します(pointで)
解説
紙のサイズを返します。(pointで)
返り値
( NSSize )
紙のサイズ
引数
フレームワーク
ApplicationKit
クラス
NSPrintInfo
Instance Methods
使用可能
10.0
参照
- setPaperSize:
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSPrintInfo *pInfo = [NSPrintInfo sharedPrintInfo] ; NSPageLayout *pageLayout = [NSPageLayout pageLayout]; [pageLayout beginSheetWithPrintInfo:pInfo modalForWindow:[sender window] delegate:self didEndSelector:@selector(didEndPageLayout) contextInfo:nil ]; NSLog([NSString stringWithFormat:@"w=%.1f,h=%.1f",[pInfo paperSize].width,[pInfo paperSize].height]); } -(void)didEndPageLayout { NSLog(@"close"); } @end